From 5d821810551e0db9677369902a7d71ff04ae2c85 Mon Sep 17 00:00:00 2001 From: Alexei Bezborodov Date: Wed, 22 Nov 2023 12:58:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9=20=D0=B8=D0=BC=D1=8F=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5=D0=B9=20?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BB=D0=BE=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20ID=20#16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot_modules/users.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bot_modules/users.py b/bot_modules/users.py index ba92907..5ae44e5 100644 --- a/bot_modules/users.py +++ b/bot_modules/users.py @@ -133,6 +133,17 @@ class ModuleUsers(mod_table_operate.TableOperateModule): def GetName(self): return module_name + def GetButtonNameAndKeyValueAndAccess(self, a_Item): + key_name_id = self.GetKeyFieldID() + name_field_id = self.m_Table.GetFieldIDByDestiny(bd_table.TableFieldDestiny.NAME) + access_field_id = self.m_Table.GetFieldIDByDestiny(bd_table.TableFieldDestiny.ACCESS) + assert key_name_id != None + assert name_field_id != None + assert access_field_id != None + return \ + a_Item[name_field_id] + '(' + str(a_Item[key_name_id]) + ')',\ + a_Item[key_name_id],\ + a_Item[access_field_id] # Работа с базой данных пользователей