From 7d52ed8802ba0de6f6e0de93543e13adf947ca26 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 29 May 2019 09:16:16 -0500 Subject: [PATCH] Fixed error retrieving group information of objects not present in the db. --- src/sessionmanager/session.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sessionmanager/session.py b/src/sessionmanager/session.py index 88f83c2..1e67f3a 100644 --- a/src/sessionmanager/session.py +++ b/src/sessionmanager/session.py @@ -263,6 +263,10 @@ class vkSession(object): k = "{key}_{case}".format(key=key, case=i) v = self.db["groups"][abs(user_id)][i] 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 def process_usernames(self, data):