Skip to content

Commit

Permalink
Merge pull request #406 from codescalers/development_1.1_fix_remove_h…
Browse files Browse the repository at this point in the history
…oliday

fix remove holiday bug incase adding and removing 1 holiday with a 1 …
  • Loading branch information
maayarosama authored Apr 24, 2024
2 parents 0c29bca + dadf6ef commit 2c8acbc
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 2c8acbc

Please sign in to comment.