mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +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…
x
Reference in New Issue
Block a user