Skip to content

Commit

Permalink
reorder values to put the previous one in the first place.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Nov 11, 2024
1 parent 8b078db commit 92d4a9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions staffing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,10 +1816,12 @@ def mission_update(request):
mission = Mission.objects.get(id=mission_id) # If no mission found, it fails, that's what we want
if attribute == "billing_mode":
values = dict(Mission.BILLING_MODES)
values = {mission.billing_mode: values.pop(mission.billing_mode), **values}
if mission.management_mode == "ELASTIC":
del values["FIXED_PRICE"]
elif attribute == "management_mode":
values = dict(Mission.MANAGEMENT_MODES)
values = { mission.management_mode: values.pop(mission.management_mode), **values}
if mission.billing_mode == "FIXED_PRICE":
del values["ELASTIC"]
elif attribute == "probability":
Expand Down

0 comments on commit 92d4a9b

Please sign in to comment.