1
1
Fork 0

Fixed post/file deletus

dev
Jan Kužílek 5 years ago
parent 15505539df
commit e04965c1f1

@ -243,7 +243,10 @@ class Post(TimestampMixin, db.Model):
def remove_image_files(self): def remove_image_files(self):
for im in self.image_files.values(): for im in self.image_files.values():
os.remove(im) try:
if im: os.remove(im)
except:
pass
@property @property
def image_files(self): def image_files(self):

Loading…
Cancel
Save