Skip to content

Commit 40e17ef

Browse files
committed
chore(controller): services protocol default is TCP
1 parent 8e4637c commit 40e17ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

rootfs/api/serializers/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,9 @@ def validate_port(value):
492492

493493
@staticmethod
494494
def validate_protocol(value):
495-
if not re.match(SERVICE_PROTOCOL_MATCH, value):
495+
if value is None or value == "":
496+
value = "TCP"
497+
elif not re.match(SERVICE_PROTOCOL_MATCH, value):
496498
raise serializers.ValidationError(SERVICE_PROTOCOL_MISMATCH_MSG)
497499
return value
498500

0 commit comments

Comments
 (0)