Commit 85fbc289 authored by John Red Medrano's avatar John Red Medrano

Merge pull request #296 in RMS/api-main-service from red-develop to RMSv2

* commit 'bf028a7c':
  change condition on edit user
parents ac78e4dd bf028a7c
......@@ -176,14 +176,12 @@ class UserViewSet(viewsets.ModelViewSet):
Q(created_by_user__code=instance.code) |
Q(requested_to_user__code=instance.code)
)
print(instance.department.code)
print(request.data['department'])
if instance.department.code != request.data['department']:
if cms_form.count() > 0 or cms_template.count() > 0:
raise ParseError(
'Cannot delete this record the user has a record on change request it might cause a data error'
'Cannot update this record the user has a record on change request it might cause a data error'
)
......
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