mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for part deep-copy
- Don't copy an image if an image doesn't exist
This commit is contained in:
parent
292e29e95e
commit
fae44c3002
@ -574,6 +574,7 @@ class Part(models.Model):
|
||||
|
||||
# Copy the part image
|
||||
if kwargs.get('image', True):
|
||||
if other.image:
|
||||
image_file = ContentFile(other.image.read())
|
||||
image_file.name = rename_part_image(self, 'test.png')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user