diff --git a/photologue_custom/views.py b/photologue_custom/views.py index c12d0a1..49301ff 100644 --- a/photologue_custom/views.py +++ b/photologue_custom/views.py @@ -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