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
5cf9c369
Commit
5cf9c369
authored
May 23, 2019
by
yangchenglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tag create
parent
13a16f48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
topic.py
api/views/topic.py
+4
-3
No files found.
api/views/topic.py
View file @
5cf9c369
...
...
@@ -110,7 +110,9 @@ class CreateTopicForBatch(BaseView):
)
if
_tag_error
:
return
self
.
error
(
_tag_error
)
_tag_data
.
update
(
location_tags
)
for
item
in
location_tags
:
_tag_data
.
update
(
item
)
# 更新发帖
# 处理标签,将文本中的标签处理成现有标签
...
...
@@ -195,12 +197,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