handle stories with 0 images
This commit is contained in:
parent
543c1fff2c
commit
e67df25d70
|
@ -47,7 +47,11 @@ class BestPractice(ItfModel):
|
|||
}
|
||||
|
||||
def main_image(self):
|
||||
return self.get_images()[0]
|
||||
imgs = self.get_images()
|
||||
if len(imgs) > 0:
|
||||
return imgs[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
def list_dict(self):
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user