Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
saturn
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
saturn
Commits
edd72e77
Commit
edd72e77
authored
Jan 19, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
add some value in batch create topic See merge request
!13
parents
583f6da7
89ef6c2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
topic.py
api/views/topic.py
+4
-0
No files found.
api/views/topic.py
View file @
edd72e77
...
...
@@ -13,6 +13,8 @@ class CreateTopicForBatch(BaseView):
def
post
(
self
,
request
):
user_id
=
request
.
POST
.
get
(
"user_id"
,
0
)
card_level
=
request
.
POST
.
get
(
"card_level"
)
tag_id
=
request
.
POST
.
get
(
"tag_id"
)
topic_list
=
json
.
loads
(
request
.
POST
.
get
(
"topic_list"
,
'[]'
))
if
not
user_id
:
...
...
@@ -45,6 +47,8 @@ class CreateTopicForBatch(BaseView):
tags
=
item
.
get
(
"tags"
)
or
[]
tag_names
.
extend
([
tag
.
replace
(
"#"
,
''
)
.
strip
()
for
tag
in
tags
])
item
[
"user_id"
]
=
user_id
item
[
"card_level"
]
=
card_level
item
[
"tag_id"
]
=
tag_id
check_info
=
Sensitive
.
check
(
tag_names
)
tags
=
[
tag_name
for
tag_name
,
succ
in
check_info
.
items
()
if
not
succ
]
...
...
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