Fix error on partial upload
This commit is contained in:
parent
3b4ab05952
commit
69529e103e
1 changed files with 2 additions and 0 deletions
|
|
@ -263,6 +263,8 @@ class ImageModel(models.Model):
|
|||
return os.path.join(os.path.dirname(self.image.name), "cache")
|
||||
|
||||
def cache_url(self):
|
||||
if not self.image:
|
||||
return ""
|
||||
return "/".join([os.path.dirname(self.image.url), "cache"])
|
||||
|
||||
def image_filename(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue