1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 12:59:36 +02:00

feat: Add country name to region page

This commit is contained in:
Sean Morley 2024-07-10 17:27:43 -04:00
parent 597e56ea62
commit bb1f2d92cf
8 changed files with 76 additions and 13 deletions

View file

@ -44,8 +44,8 @@ class Adventure(models.Model):
raise ValidationError('Adventures must be associated with trips owned by the same user. Trip owner: ' + self.trip.user_id.username + ' Adventure owner: ' + self.user_id.username)
if self.type != self.trip.type:
raise ValidationError('Adventure type must match trip type. Trip type: ' + self.trip.type + ' Adventure type: ' + self.type)
if self.type == 'featured' and not self.is_public:
raise ValidationError('Featured adventures must be public. Adventure: ' + self.name)
if self.type == 'featured' and not self.is_public:
raise ValidationError('Featured adventures must be public. Adventure: ' + self.name)
def __str__(self):
return self.name