Do not crash on missing owner
This commit is contained in:
parent
2200b0d436
commit
d95f29c870
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ class CustomGalleryDetailView(DetailView):
|
|||
# List owners
|
||||
context['owners'] = []
|
||||
for photo in context['photos']:
|
||||
if photo.extended.owner not in context['owners']:
|
||||
if hasattr(photo, 'extended') and photo.extended.owner not in context['owners']:
|
||||
context['owners'].append(photo.extended.owner)
|
||||
|
||||
# Filter on owner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue