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
de7749be
Commit
de7749be
authored
Aug 31, 2019
by
zhongshangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善用户编辑专家领域标签
parent
26b13f65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
user.py
api/user.py
+8
-0
No files found.
api/user.py
View file @
de7749be
...
...
@@ -66,6 +66,13 @@ class UserUpdateOrCreate(APIView):
body_esthetics_tag_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
':'
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'body_esthetics_tags'
,
'[]'
))))
expert_tags
=
json
.
loads
(
request
.
POST
.
get
(
'expert_tags'
,
'[]'
))
try
:
expert_tag_ids
=
[[
int
(
item
[
0
]
.
split
(
":"
)[
0
]),
int
(
item
[
1
])]
for
item
in
expert_tags
]
except
:
error_logger
.
error
(
u'创建/编辑
%
s用户详情失败
%
s'
%
(
id
,
e
))
raise
data
=
{
'user_id'
:
user_id
,
'password'
:
password
,
...
...
@@ -80,6 +87,7 @@ class UserUpdateOrCreate(APIView):
'gender'
:
request
.
POST
.
get
(
'gender'
),
'is_tcc'
:
int
(
request
.
POST
.
get
(
'is_tcc'
,
0
)),
'body_esthetics_tag_ids'
:
body_esthetics_tag_ids
,
'expert_tag_ids'
:
expert_tag_ids
,
'is_kol'
:
int
(
request
.
POST
.
get
(
'is_kol'
,
0
)),
}
...
...
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