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:
parent
597e56ea62
commit
bb1f2d92cf
8 changed files with 76 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue