Bug fix for part deep-copy

- Don't copy an image if an image doesn't exist
This commit is contained in:
Oliver Walters 2019-05-15 09:21:31 +10:00
parent 292e29e95e
commit fae44c3002

View File

@ -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')