From f437b5fbfbbf9bbd6088dc4ff39a4737c82f6439 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 15 May 2018 18:54:19 +0200 Subject: Fix tests for M2M images --- ishtar_common/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 97af69417..b4a385b4e 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3183,7 +3183,8 @@ class IshtarImage(ImageModel): super(IshtarImage, self).save(*args, **kwargs) - if not no_path_change and not getattr(self, '_no_path_change', False): + if self.image and not no_path_change and \ + not getattr(self, '_no_path_change', False): links = self._move_image() links = self.LINK_SPLIT.join(links) if links != self.associated_links: -- cgit v1.2.3