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
3be054ce
Commit
3be054ce
authored
Aug 09, 2019
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code
parent
cd6f01a7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
pictorial.py
api/views/pictorial.py
+6
-1
No files found.
api/views/pictorial.py
View file @
3be054ce
...
@@ -28,8 +28,13 @@ class CreatePictorial(BaseView):
...
@@ -28,8 +28,13 @@ class CreatePictorial(BaseView):
ins_cache
.
delete
(
obj
)
ins_cache
.
delete
(
obj
)
def
get_random_user_id
(
self
):
def
get_random_user_id
(
self
):
while
True
:
index
=
randint
(
0
,
5000
)
index
=
randint
(
0
,
5000
)
return
self
.
user_id_start
+
index
user_id
=
self
.
user_id_start
+
index
error
,
data
=
self
.
call_rpc
(
'venus/community/user/is_shadow'
,
user_id
=
user_id
)
ret
=
data
.
get
(
'user_id'
)
if
ret
:
return
user_id
def
get_user_id
(
self
,
id_
,
platform
):
def
get_user_id
(
self
,
id_
,
platform
):
cache_key
=
'grap:{}:{}'
.
format
(
platform
,
id_
)
cache_key
=
'grap:{}:{}'
.
format
(
platform
,
id_
)
...
...
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