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"
  • Loading branch information
QuanMPhm authored Jan 16, 2024
1 parent 4897bd6 commit be99c0f
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 be99c0f

Please sign in to comment.