mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 11:05:41 +00:00
@ -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:
|
||||
|
Reference in New Issue
Block a user