Leave 'ipv6only' as a part of the VM name if it starts with it
This commit is contained in:
parent
15db1c88d7
commit
07c7a64c5a
1 changed files with 4 additions and 1 deletions
|
@ -162,7 +162,10 @@ class VirtualMachineSerializer(serializers.Serializer):
|
||||||
return '-'
|
return '-'
|
||||||
|
|
||||||
def get_name(self, obj):
|
def get_name(self, obj):
|
||||||
return obj.name.lstrip('public-')
|
if obj.name.startswith('public-'):
|
||||||
|
return obj.name.lstrip('public-')
|
||||||
|
else:
|
||||||
|
return obj.name
|
||||||
|
|
||||||
|
|
||||||
class VMTemplateSerializer(serializers.Serializer):
|
class VMTemplateSerializer(serializers.Serializer):
|
||||||
|
|
Loading…
Reference in a new issue