Commit 5542e353 authored by Gladys Forte's avatar Gladys Forte

update delegation fix

parent d00fcafa
......@@ -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