Merge pull request #2967 from Anthony25/fix_cable_length_unit_api

Allow nullable length unit in cable API
This commit is contained in:
Jeremy Stretch 2019-03-05 13:17:37 -05:00 committed by GitHub
commit 0572c66c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -507,7 +507,7 @@ class CableSerializer(ValidatedModelSerializer):
termination_a = serializers.SerializerMethodField(read_only=True)
termination_b = serializers.SerializerMethodField(read_only=True)
status = ChoiceField(choices=CONNECTION_STATUS_CHOICES, required=False)
length_unit = ChoiceField(choices=CABLE_LENGTH_UNIT_CHOICES, required=False)
length_unit = ChoiceField(choices=CABLE_LENGTH_UNIT_CHOICES, required=False, allow_null=True)
class Meta:
model = Cable