Skip to content
Snippets Groups Projects
Commit ce38a77f authored by Yannik Ammann's avatar Yannik Ammann
Browse files

catch

parent b99f2cab
No related branches found
No related tags found
No related merge requests found
......@@ -75,10 +75,11 @@ class Favicon(models.Model):
def save(self, *args, **kwargs):
update = False
orig = Favicon.objects.get(pk=self.pk)
if orig.faviconImage is not self.faviconImage:
orig.del_image()
update = True
if Favicon.objects.filter(pk=self.pk):
orig = Favicon.objects.get(pk=self.pk)
if orig.faviconImage is not self.faviconImage:
orig.del_image()
update = True
if self.isFavicon:
for n in Favicon.objects.exclude(pk=self.pk):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment