Skip to content

Commit

Permalink
Fixed allocation bug in views.py
Browse files Browse the repository at this point in the history
The if statement used the wrong operator to determine if the allocation status was changed to "Denied" or "Revoked"

Signed-off-by: Quan Pham <[email protected]>
  • Loading branch information
QuanMPhm committed Dec 12, 2024
1 parent 0b96bd3 commit 5194a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coldfront/core/allocation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def post(self, request, *args, **kwargs):
allocation_obj.end_date = None
allocation_obj.save()

if allocation_obj.status.name == ['Denied', 'Revoked']:
if allocation_obj.status.name in ['Denied', 'Revoked']:
allocation_disable.send(
sender=self.__class__, allocation_pk=allocation_obj.pk)
allocation_users = allocation_obj.allocationuser_set.exclude(
Expand Down

0 comments on commit 5194a15

Please sign in to comment.