Skip to content

Commit

Permalink
fix: Fix the freakin' bug of a non-existent "date" propertea ☕️
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Oct 14, 2024
1 parent 210f2d3 commit b9b2ce7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/animals/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,7 @@ def get_context_data(self, **kwargs):
animals_with_location, cls=CustomJSONEncoder
)

start_date = (
ItineraryStop.objects.order_by("date")
.annotate(date_day=TruncDate("date"))
.first()
.date_day
)
start_date = ItineraryStop.objects.order_by("start_date").first().start_date
today_date = date.today()
total_days_amount = (today_date - start_date).days + 1

Expand Down

0 comments on commit b9b2ce7

Please sign in to comment.