Commit 3be054ce authored by haowang's avatar haowang

fix code

parent cd6f01a7
......@@ -28,8 +28,13 @@ class CreatePictorial(BaseView):
ins_cache.delete(obj)
def get_random_user_id(self):
index = randint(0, 5000)
return self.user_id_start + index
while True:
index = randint(0, 5000)
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):
cache_key = 'grap:{}:{}'.format(platform, id_)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment