mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
Cleanup
This commit is contained in:
parent
2a9b58925c
commit
b36f2ba1c9
@ -49,10 +49,9 @@ class ChoiceField(serializers.Field):
|
|||||||
if obj != '':
|
if obj != '':
|
||||||
# Use an empty string in place of the choice label if it cannot be resolved (i.e. because a previously
|
# Use an empty string in place of the choice label if it cannot be resolved (i.e. because a previously
|
||||||
# configured choice has been removed from FIELD_CHOICES).
|
# configured choice has been removed from FIELD_CHOICES).
|
||||||
label = self._choices.get(obj, '')
|
|
||||||
return {
|
return {
|
||||||
'value': obj,
|
'value': obj,
|
||||||
'label': label,
|
'label': self._choices.get(obj, ''),
|
||||||
}
|
}
|
||||||
|
|
||||||
def to_internal_value(self, data):
|
def to_internal_value(self, data):
|
||||||
|
Loading…
Reference in New Issue
Block a user