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
b69c89e0
Commit
b69c89e0
authored
6 years ago
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
fix code See merge request
!95
parents
c044de71
4da8995e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
pictorial.py
api/views/pictorial.py
+5
-2
No files found.
api/views/pictorial.py
View file @
b69c89e0
...
...
@@ -109,7 +109,9 @@ class CreatePictorial(BaseView):
error
,
ret
=
self
.
call_rpc
(
'venus/community/crawl/replys'
,
data
=
[
top_comment
],
platform
=
platform
,
topic_id
=
topic_id
,
pictorial_id
=
pictorial_id
)
if
error
:
return
error
,
ret
top_id
=
ret
.
get
(
'reply_ids'
)[
0
]
top_id
=
0
for
obj
in
comments
:
obj
[
'user_id'
]
=
self
.
get_user_id
(
id_
=
obj
.
get
(
'user'
)
.
get
(
'id'
),
platform
=
platform
)
...
...
@@ -117,7 +119,8 @@ class CreatePictorial(BaseView):
error
,
_
=
self
.
call_rpc
(
'venus/community/crawl/replys'
,
data
=
comments
,
platform
=
platform
,
topic_id
=
topic_id
,
pictorial_id
=
pictorial_id
,
top_id
=
top_id
)
if
error
:
return
error
,
_
return
error
,
None
return
None
,
None
def
create_topic
(
self
,
topics
,
platform
):
for
topic
in
topics
:
...
...
@@ -172,7 +175,7 @@ class CreatePictorial(BaseView):
if
topics
:
for
obj
in
topics
:
error
,
id
_
=
self
.
call_rpc
(
'venus/community/crawl/topic'
,
data
=
obj
,
platform
=
platform
,
pictorial_id
=
pictorial_id
)
error
,
_
=
self
.
call_rpc
(
'venus/community/crawl/topic'
,
data
=
obj
,
platform
=
platform
,
pictorial_id
=
pictorial_id
)
if
error
:
return
error
,
None
if
pictorial_comments
:
...
...
This diff is collapsed.
Click to expand it.
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