mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-07 20:10:58 +00:00
Add explicit choice options
This commit is contained in:
@@ -726,6 +726,7 @@ class ParameterTemplateSerializer(
|
|||||||
# Note: The choices are overridden at run-time on class initialization
|
# Note: The choices are overridden at run-time on class initialization
|
||||||
model_type = ContentTypeField(
|
model_type = ContentTypeField(
|
||||||
mixin_class=InvenTreeParameterMixin,
|
mixin_class=InvenTreeParameterMixin,
|
||||||
|
choices=common.validators.parameter_template_model_options,
|
||||||
label=_('Model Type'),
|
label=_('Model Type'),
|
||||||
default='',
|
default='',
|
||||||
required=False,
|
required=False,
|
||||||
@@ -796,6 +797,7 @@ class ParameterSerializer(
|
|||||||
# Note: The choices are overridden at run-time on class initialization
|
# Note: The choices are overridden at run-time on class initialization
|
||||||
model_type = ContentTypeField(
|
model_type = ContentTypeField(
|
||||||
mixin_class=InvenTreeParameterMixin,
|
mixin_class=InvenTreeParameterMixin,
|
||||||
|
choices=common.validators.parameter_model_options,
|
||||||
label=_('Model Type'),
|
label=_('Model Type'),
|
||||||
default='',
|
default='',
|
||||||
allow_null=False,
|
allow_null=False,
|
||||||
|
|||||||
Reference in New Issue
Block a user