Skip to content

Commit

Permalink
Updated lines 124-126 of chul/models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ertush committed Jul 30, 2024
1 parent 8ede191 commit 77339cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chul/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def buffer_updates(
health_unit=chu_instance,
is_approved=False, is_rejected=False)

update = chu_updates[-1] if chu_updates.__len__() > 0 else None
update = chu_updates[chu_updates.__len__() - 1] if chu_updates.__len__() > 0 else None

if update is None:
raise ChuUpdateBuffer.DoesNotExist
Expand Down

0 comments on commit 77339cc

Please sign in to comment.