diff --git a/backend/server/adventures/models.py b/backend/server/adventures/models.py index b09d603..800677a 100644 --- a/backend/server/adventures/models.py +++ b/backend/server/adventures/models.py @@ -787,8 +787,8 @@ class Lodging(models.Model): updated_at = models.DateTimeField(auto_now=True) def clean(self): - if self.date and self.end_date and self.date > self.end_date: - raise ValidationError('The start date must be before the end date. Start date: ' + str(self.date) + ' End date: ' + str(self.end_date)) + if self.check_in and self.check_out and self.check_in > self.check_out: + raise ValidationError('The start date must be before the end date. Start date: ' + str(self.check_in) + ' End date: ' + str(self.check_out)) if self.collection: if self.collection.is_public and not self.is_public: diff --git a/frontend/src/lib/components/LodgingCard.svelte b/frontend/src/lib/components/LodgingCard.svelte index abb2cfd..7b7395c 100644 --- a/frontend/src/lib/components/LodgingCard.svelte +++ b/frontend/src/lib/components/LodgingCard.svelte @@ -138,7 +138,9 @@

{formatDateInTimezone(lodging.check_in ?? '', lodging.timezone ?? undefined)} – {formatDateInTimezone(lodging.check_out ?? '', lodging.timezone ?? undefined)} - ({lodging.timezone}) + {#if lodging.timezone} + ({lodging.timezone}) + {/if}

{/if}