dont die for 0 images on meetings
This commit is contained in:
parent
55fc0e5227
commit
8631ed7f64
|
@ -50,8 +50,11 @@ class Meeting(ItfModel):
|
|||
return self.preview_dict()
|
||||
|
||||
def main_image(self):
|
||||
if Image.objects.filter(meeting=self).count() > 0:
|
||||
img = Image.objects.filter(meeting=self)[0]
|
||||
return img.file
|
||||
else:
|
||||
return None
|
||||
|
||||
def info_dict(self):
|
||||
meeting_data = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user