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
0
Merge Requests
0
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
钟尚武
sun
Commits
de7749be
Commit
de7749be
authored
5 years ago
by
zhongshangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善用户编辑专家领域标签
parent
26b13f65
master
dev
like-pre/r01
quick-reply
refactor
test
No related merge requests found
Show 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):
...
@@ -66,6 +66,13 @@ class UserUpdateOrCreate(APIView):
body_esthetics_tag_ids
=
list
(
body_esthetics_tag_ids
=
list
(
map
(
lambda
x
:
x
.
split
(
':'
)[
0
],
json
.
loads
(
request
.
POST
.
get
(
'body_esthetics_tags'
,
'[]'
))))
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
=
{
data
=
{
'user_id'
:
user_id
,
'user_id'
:
user_id
,
'password'
:
password
,
'password'
:
password
,
...
@@ -80,6 +87,7 @@ class UserUpdateOrCreate(APIView):
...
@@ -80,6 +87,7 @@ class UserUpdateOrCreate(APIView):
'gender'
:
request
.
POST
.
get
(
'gender'
),
'gender'
:
request
.
POST
.
get
(
'gender'
),
'is_tcc'
:
int
(
request
.
POST
.
get
(
'is_tcc'
,
0
)),
'is_tcc'
:
int
(
request
.
POST
.
get
(
'is_tcc'
,
0
)),
'body_esthetics_tag_ids'
:
body_esthetics_tag_ids
,
'body_esthetics_tag_ids'
:
body_esthetics_tag_ids
,
'expert_tag_ids'
:
expert_tag_ids
,
'is_kol'
:
int
(
request
.
POST
.
get
(
'is_kol'
,
0
)),
'is_kol'
:
int
(
request
.
POST
.
get
(
'is_kol'
,
0
)),
}
}
...
...
This diff is collapsed.
Click to expand it.
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