Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
11
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8786e8ae
authored
Oct 10, 2019
by
Belákovics Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename template params
parent
70bd9c63
Pipeline
#923
passed with stage
in 1 minute 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
recircle/template/views.py
+6
-6
No files found.
recircle/template/views.py
View file @
8786e8ae
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment