Commit 8786e8ae by Belákovics Ádám

Rename template params

parent 70bd9c63
Pipeline #923 passed with stage
in 1 minute 19 seconds
......@@ -12,14 +12,14 @@ class ImageTemplateViewSet(ModelViewSet):
def create(self, request):
serializer = ImageTemplateModelSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
data = serializer.validated_data
params = serializer.validated_data
new_template = ImageTemplate.create(
name=data["name"],
description=data["description"],
name=params["name"],
description=params["description"],
created_by=request.user,
image=data["image"],
lease=data["lease"],
flavor=data["flavor"],
image=params["image"],
lease=params["lease"],
flavor=params["flavor"],
type="U"
)
serializer = ImageTemplateModelSerializer(instance=new_template)
......
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