fix carousel slugs
This commit is contained in:
parent
41f6b8c930
commit
f0585b3ebc
|
|
@ -279,6 +279,11 @@ class Carousel(models.Model):
|
|||
|
||||
@property
|
||||
def slug(self):
|
||||
if hasattr(self.content_object, 'slugs'):
|
||||
try:
|
||||
return next(iter(self.content_object.slugs.values()))
|
||||
except StopIteration:
|
||||
return None
|
||||
if hasattr(self.content_object, 'slug'):
|
||||
return self.content_object.slug
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user