Leave 'ipv6only' as a part of the VM name if it starts with it

This commit is contained in:
PCoder 2018-08-04 08:46:00 +02:00
parent 15db1c88d7
commit 07c7a64c5a

View file

@ -162,7 +162,10 @@ class VirtualMachineSerializer(serializers.Serializer):
return '-'
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):