Skip to content

Commit

Permalink
fix remove holiday bug incase adding and removing 1 holiday with a 1 …
Browse files Browse the repository at this point in the history
…exisiting holiday
  • Loading branch information
maayarosama committed Apr 24, 2024
1 parent 0c29bca commit dadf6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/cshr/views/vacations.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def post(self, request: Request) -> Response:
location=location, holiday_date__in=public_holidays
).values_list("id", flat=True)

if len(public_holidays) < len(balance[0].public_holidays.all()):
if len(public_holidays) <= len(balance[0].public_holidays.all()):
deleted_holidays = []
for holiday in balance[0].public_holidays.all():
if holiday.id not in public_holidays:
Expand Down

0 comments on commit dadf6ef

Please sign in to comment.