forked from 0x2620/pandora
try/except remove poster
This commit is contained in:
parent
af340843d8
commit
d023219359
1 changed files with 2 additions and 2 deletions
|
@ -893,9 +893,9 @@ class Item(models.Model):
|
|||
def delete_poster(self):
|
||||
if self.poster:
|
||||
path = self.poster.path
|
||||
if os.path.exists(path):
|
||||
try:
|
||||
self.poster.delete()
|
||||
else:
|
||||
except:
|
||||
self.poster.name = None
|
||||
else:
|
||||
poster= self.path('poster.jpg')
|
||||
|
|
Loading…
Reference in a new issue