Commit a87f167e authored by Gladys Forte's avatar Gladys Forte

Merge pull request #445 in RMS/api-main-service from gladys-dev2 to RMSv2

* commit '5542e353':
  update delegation fix
parents 257b6580 5542e353
......@@ -73,7 +73,7 @@ class DelegationViewSet(viewsets.ModelViewSet):
if not exist_in_dept.count() > 0:
print(exist_in_dept)
if not (new_instance['name'].lower() == 'head of department' or
new_instance['name'].lower() == 'sd/od' or
new_instance['name'].lower() == 'change control board' or
......@@ -124,12 +124,12 @@ class DelegationViewSet(viewsets.ModelViewSet):
old_instance = model_to_dict(instance)
# restrictions
if not (new_instance['name'].lower() == 'head of department' or
new_instance['name'].lower() == 'sd/od' or
new_instance['name'].lower() == 'change control board' or
new_instance['name'].lower() == 'approver' or
new_instance['name'].lower() == 'vendor/implementor' or
new_instance['name'].lower() == 'requestor'):
if not (old_instance['name'].lower() == 'head of department' or
old_instance['name'].lower() == 'sd/od' or
old_instance['name'].lower() == 'change control board' or
old_instance['name'].lower() == 'approver' or
old_instance['name'].lower() == 'vendor/implementor' or
old_instance['name'].lower() == 'requestor'):
self.perform_update(serializer)
new_instance = serializer.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment