Do not enforce units for part parameters (#5423)

Backport of #5160
This commit is contained in:
Oliver 2023-08-10 21:13:46 +10:00 committed by GitHub
parent b1158f7083
commit 7391f33a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3528,15 +3528,6 @@ class PartParameter(MetadataMixin, models.Model):
super().clean()
# Validate the parameter data against the template units
if self.template.units:
try:
InvenTree.conversion.convert_physical_value(self.data, self.template.units)
except ValidationError as e:
raise ValidationError({
'data': e.message
})
# Validate the parameter data against the template choices
if choices := self.template.get_choices():
if self.data not in choices: