Commit 1248bd84 by Chif Gergő

Fix some errors in creating template

parent 61658071
Pipeline #1065 failed with stage
in 1 minute 29 seconds
...@@ -143,8 +143,8 @@ STATIC_URL = "/static/" ...@@ -143,8 +143,8 @@ STATIC_URL = "/static/"
# VM ACCESS PROTOCOLS # VM ACCESS PROTOCOLS
VM_ACCESS_PROTOCOLS = { VM_ACCESS_PROTOCOLS = {
"rdp": ["Remote Desktop Protocol", 3389, "tcp"], "RDP": ["Remote Desktop Protocol", 3389, "tcp"],
"ssh": ["Secure Shell", 22, "tcp"], "SSH": ["Secure Shell", 22, "tcp"],
} }
# LEASE TYPES # LEASE TYPES
......
...@@ -17,11 +17,11 @@ class ImageTemplateViewSet(ModelViewSet): ...@@ -17,11 +17,11 @@ class ImageTemplateViewSet(ModelViewSet):
serializer = ImageTemplateModelSerializer(data=request.data) serializer = ImageTemplateModelSerializer(data=request.data)
serializer.is_valid(raise_exception=True) serializer.is_valid(raise_exception=True)
data = serializer.validated_data data = serializer.validated_data
new_template = ImageTemplate.create( new_template = ImageTemplate(
name=data["name"], name=data["name"],
description=data["description"], description=data["description"],
access_protocol=data["access"], access_protocol=data["access_protocol"],
system_type=data["system"], system_type=data["system_type"],
distro=data["distro"], distro=data["distro"],
created_by=request.user, created_by=request.user,
image=data["image"], image=data["image"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment