mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
parent
b1158f7083
commit
7391f33a97
@ -3528,15 +3528,6 @@ class PartParameter(MetadataMixin, models.Model):
|
|||||||
|
|
||||||
super().clean()
|
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
|
# Validate the parameter data against the template choices
|
||||||
if choices := self.template.get_choices():
|
if choices := self.template.get_choices():
|
||||||
if self.data not in choices:
|
if self.data not in choices:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user