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
fd8fd189
Commit
fd8fd189
authored
Jul 10, 2019
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/pin_crawl' into 'master'
fix pictorial name See merge request
alpha/saturn!73
parents
6e07d665
7687428c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
topic.py
api/views/topic.py
+6
-2
No files found.
api/views/topic.py
View file @
fd8fd189
...
...
@@ -121,6 +121,8 @@ 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_name = request.POST.get('pictorial_name', '')
# pictorial_alias = request.POST.get('pictorial_alias', '')
pictorial_tag_ids
=
json
.
loads
(
request
.
POST
.
get
(
"tag_ids"
,
'[]'
))
is_app
=
request
.
POST
.
get
(
'is_app'
,
None
)
...
...
@@ -174,7 +176,6 @@ 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
.
batch_create_tags
(
tags
=
[
item
.
get
(
"location"
)
.
get
(
"name"
)],
is_location
=
1
,
is_own
=
1
)
if
_location_tag_data
:
...
...
@@ -205,9 +206,12 @@ class CreateTopicForBatch(BaseView):
'api'
:
'venus/community/topic/batch_create_for_inner'
,
'topic_list'
:
topic_list
,
})
pictorial_name
=
topics
[
0
]
.
get
(
'pictorial_name'
,
''
)
pictorial_alias
=
topics
[
0
]
.
get
(
'pictorial_alias'
,
''
)
create_err
,
result
=
self
.
call_rpc
(
"venus/community/topic/batch_create_for_inner"
,
topic_list
=
topic_list
topic_list
=
topic_list
,
pictorial_tag_ids
=
pictorial_tag_ids
,
pictorial_name
=
pictorial_name
,
pictorial_alias
=
pictorial_alias
,
)
if
create_err
:
return
self
.
error
(
create_err
)
...
...
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