mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
b1158f7083
commit
7391f33a97
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user