diff --git a/InvenTree/InvenTree/serializers.py b/InvenTree/InvenTree/serializers.py index eea8072bf3..fa7674723c 100644 --- a/InvenTree/InvenTree/serializers.py +++ b/InvenTree/InvenTree/serializers.py @@ -50,7 +50,6 @@ class InvenTreeModelSerializer(serializers.ModelSerializer): # Now ensure the underlying model is correct instance = self.Meta.model(**data) - instance.validate_unique() instance.clean() return data diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 6c05d62a7e..8aa370a7ae 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -380,7 +380,6 @@ class Part(MPTTModel): previous.image.delete(save=False) self.clean() - self.validate_unique() super().save(*args, **kwargs) @@ -672,6 +671,8 @@ class Part(MPTTModel): super().clean() + self.validate_unique() + if self.trackable: for part in self.get_used_in().all():