Skip to content

Commit

Permalink
Check form clearance is not none
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed Nov 12, 2024
1 parent 7fa5695 commit acfbaee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tally_ho/apps/tally/views/clearance.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@ def post(self, *args, **kwargs):
self.request.user):
possible_states.append(FormState.ARCHIVED)

if (result_form.form_state == FormState.CLEARANCE) &\
(result_form.clearance is not None) &\
(result_form.clearance.resolution_recommendation ==\
ClearanceResolution.PENDING_FIELD_INPUT):
possible_states.append(FormState.CLEARANCE)
if result_form.clearance is not None:
if (result_form.form_state == FormState.CLEARANCE) &\
(result_form.clearance.resolution_recommendation ==\
ClearanceResolution.PENDING_FIELD_INPUT):
possible_states.append(FormState.CLEARANCE)

form = safe_form_in_state(result_form, possible_states, form)

Expand Down

0 comments on commit acfbaee

Please sign in to comment.