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
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
钟尚武
saturn
Commits
056fca26
Commit
056fca26
authored
May 29, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into 'master'
Test See merge request
alpha/saturn!57
parents
32f144c4
02f63f7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
topic.py
api/views/topic.py
+3
-2
No files found.
api/views/topic.py
View file @
056fca26
...
...
@@ -25,6 +25,7 @@ class CreateTopicForBatch(BaseView):
is_online
=
request
.
POST
.
get
(
"is_online"
,
0
)
platform
=
int
(
request
.
POST
.
get
(
"platform"
))
topic_list
=
json
.
loads
(
request
.
POST
.
get
(
"topic_list"
,
'[]'
))
pictorial_tag_ids
=
json
.
loads
(
request
.
POST
.
get
(
"tag_ids"
,
'[]'
))
if
not
user_id
:
return
self
.
parameter_invalid_response
()
...
...
@@ -66,6 +67,7 @@ class CreateTopicForBatch(BaseView):
item
[
"card_level"
]
=
card_level
item
[
"tag_id"
]
=
tag_id
if
tag_id
else
None
item
[
"is_online"
]
=
is_online
item
[
"pictorial_tag_ids"
]
=
pictorial_tag_ids
if
item
.
get
(
"location"
)
and
item
.
get
(
"location"
)
.
get
(
"name"
):
_tag_error
,
_location_tag_data
=
self
.
call_rpc
(
"venus/community/tag/batch_create_tag_by_name"
,
...
...
@@ -197,12 +199,11 @@ class CreateTopicForBatchByOne(BaseView):
# check_info = Sensitive.check(tag_names)
# tags = [tag_name for tag_name, succ in check_info.items() if not succ]
# check_info = Sensitive.check(tag_names)
tags
=
[{
"name"
:
item
}
for
item
in
tag_names
]
# 先创建标签
_tag_error
,
_tag_data
=
self
.
call_rpc
(
"venus/community/tag/batch_create_tag_by_name"
,
tags
=
tags
tags
=
tag
_name
s
)
if
_tag_error
:
return
self
.
error
(
_tag_error
)
...
...
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