Commit 2a709df7 authored by Gladys Forte's avatar Gladys Forte

fix route back

parent 9376c5ca
......@@ -595,9 +595,10 @@ def cr_routing_actions(approver_instance, current_user, move_to_level):
back_to_approver = models.ChangeRequestFormApprovers.objects.filter(
Q(form_code=form_code) &
Q(level=move_to_level)
Q(level=move_to_level) &
(~Q(action=None) | Q(delegation__name='Requestor'))
).first()
print(back_to_approver.delegation.name)
if back_to_approver.delegation.name.lower() == 'requestor':
......
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