mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Prevent name check on null attachment file
(cherry picked from commit c4ed1e23a01f278d696c2853337bdde0a682c6c5)
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user