Fixed error retrieving group information of objects not present in the db.

This commit is contained in:
Manuel Cortez 2019-05-29 09:16:16 -05:00
parent 9d44d063eb
commit 7d52ed8802

View File

@ -263,6 +263,10 @@ class vkSession(object):
k = "{key}_{case}".format(key=key, case=i) k = "{key}_{case}".format(key=key, case=i)
v = self.db["groups"][abs(user_id)][i] v = self.db["groups"][abs(user_id)][i]
user_data[k] = v user_data[k] = v
else:
group = self.vk.client.groups.getById(group_ids=-1*user_id)[0]
self.process_usernames(data=dict(profiles=[], groups=[group]))
return self.get_user(user_id=user_id, key=key)
return user_data return user_data
def process_usernames(self, data): def process_usernames(self, data):