Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
sun
Commits
dafbd47a
Commit
dafbd47a
authored
Sep 18, 2019
by
zhongshangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f38842c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tag.py
api/tag.py
+3
-3
No files found.
api/tag.py
View file @
dafbd47a
...
@@ -60,7 +60,7 @@ class TagUpdateOrCreateView(APIView):
...
@@ -60,7 +60,7 @@ class TagUpdateOrCreateView(APIView):
official_pictorial_id
=
official_pictorial_id
[
0
]
official_pictorial_id
=
official_pictorial_id
[
0
]
else
:
else
:
official_pictorial_id
=
None
official_pictorial_id
=
None
is_expert
=
int
(
request
.
POST
.
get
(
'is_expert'
,
0
))
data
=
{
data
=
{
'name'
:
request
.
POST
.
get
(
'name'
)
.
lower
(),
'name'
:
request
.
POST
.
get
(
'name'
)
.
lower
(),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
'description'
:
request
.
POST
.
get
(
'description'
,
''
),
...
@@ -75,8 +75,8 @@ class TagUpdateOrCreateView(APIView):
...
@@ -75,8 +75,8 @@ class TagUpdateOrCreateView(APIView):
'official_pictorial_id'
:
official_pictorial_id
,
'official_pictorial_id'
:
official_pictorial_id
,
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
,
'false'
),
'is_show_in_register'
:
request
.
POST
.
get
(
'is_show_in_register'
,
'false'
),
'is_expert'
:
request
.
POST
.
get
(
'is_expert'
,
0
),
'is_expert'
:
request
.
POST
.
get
(
'is_expert'
,
0
),
'gray_badge'
:
request
.
POST
.
get
(
'gray_badge'
,
''
),
'gray_badge'
:
request
.
POST
.
get
(
'gray_badge'
,
''
)
if
is_expert
else
""
,
'light_badge'
:
request
.
POST
.
get
(
'light_badge'
,
''
),
'light_badge'
:
request
.
POST
.
get
(
'light_badge'
,
''
)
if
is_expert
else
""
,
'pictorial_ids'
:
list
(
'pictorial_ids'
:
list
(
(
map
(
lambda
x
:
int
(
x
.
split
(
":"
)[
0
]),
json
.
loads
((
request
.
POST
.
get
(
'pictorial_ids'
,
'[]'
))))))
(
map
(
lambda
x
:
int
(
x
.
split
(
":"
)[
0
]),
json
.
loads
((
request
.
POST
.
get
(
'pictorial_ids'
,
'[]'
))))))
}
}
...
...
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