Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mentha
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
rank
mentha
Commits
34d5c14b
Commit
34d5c14b
authored
Mar 03, 2021
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dockfile
parent
388beb36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
transfer.py
data_sync/article/transfer.py
+8
-6
No files found.
data_sync/article/transfer.py
View file @
34d5c14b
...
...
@@ -9,7 +9,7 @@ from tags.services.tag import (get_tagv3_analysis_info, get_tagv3_ids_by_tagv3_n
get_first_demand_ids_by_name
,
get_second_demand_ids_by_name
,
get_first_position_ids_by_name
,
get_second_position_ids_by_name
,
get_first_solution_ids_by_name
,
get_second_solution_ids_by_name
)
from
talos.services.tag
import
TagService
rpc
=
get_rpc_invoker
()
...
...
@@ -35,12 +35,14 @@ def get_articles(pks):
if
topic
:
item
[
'title'
]
=
topic
.
title
item
[
'content'
]
=
topic
.
answer_richtext
tags
=
topic
.
tags
tags_id_list
=
[
tag
.
id
for
tag
in
tags
]
item
[
'tag_ids'
]
=
tags_id_list
item
[
'tags'
]
=
[
tag
.
name
for
tag
in
tags
]
# tags = topic.tags
tags
=
TagService
.
get_tags_info_by_ids
(
tag_ids
=
topic
.
tag_ids
)
# tags_id_list = [tag.id for tag in tags]
item
[
'tag_ids'
]
=
topic
.
tag_ids
item
[
'tags'
]
=
[
tag
.
get
(
"tag_name"
)
for
tag
in
tags
]
# 新标签
fresh_tag_result
=
rpc
[
"api/agile_tag/tuple_new_tags"
](
old_tag_ids
=
tags_id_list
)
# fresh_tag_result = rpc["api/agile_tag/tuple_new_tags"](old_tag_ids=tags_id_list)
fresh_tag_result
=
rpc
[
"api/agile_tag/tuple_new_tags"
](
old_tag_ids
=
topic
.
tag_ids
)
fresh_tag_id_list
=
list
()
fresh_tag_name_list
=
list
()
for
fresh_tag_id
,
fresh_tag_name
in
fresh_tag_result
.
unwrap
():
...
...
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