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/"
# VM ACCESS PROTOCOLS
VM_ACCESS_PROTOCOLS = {
"rdp": ["Remote Desktop Protocol", 3389, "tcp"],
"ssh": ["Secure Shell", 22, "tcp"],
"RDP": ["Remote Desktop Protocol", 3389, "tcp"],
"SSH": ["Secure Shell", 22, "tcp"],
}
# LEASE TYPES
......
......@@ -17,11 +17,11 @@ class ImageTemplateViewSet(ModelViewSet):
serializer = ImageTemplateModelSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
data = serializer.validated_data
new_template = ImageTemplate.create(
new_template = ImageTemplate(
name=data["name"],
description=data["description"],
access_protocol=data["access"],
system_type=data["system"],
access_protocol=data["access_protocol"],
system_type=data["system_type"],
distro=data["distro"],
created_by=request.user,
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