Prevent name check on null attachment file
(cherry picked from commit c4ed1e23a01f278d696c2853337bdde0a682c6c5)
This commit is contained in:
parent
906ae218aa
commit
8c2d89de20
|
|
@ -385,7 +385,7 @@ class InvenTreeAttachment(models.Model):
|
|||
'link': _('Missing external link'),
|
||||
})
|
||||
|
||||
if self.attachment.name.lower().endswith('.svg'):
|
||||
if self.attachment and self.attachment.name.lower().endswith('.svg'):
|
||||
self.attachment.file.file = self.clean_svg(self.attachment)
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Reference in New Issue