From c4ab7b12f653fbcea4507077e20baefe75c79251 Mon Sep 17 00:00:00 2001 From: Dennis Potter Date: Sat, 2 Feb 2019 16:19:06 +0100 Subject: [PATCH] Removed db argument from Group class This argument was redundant, since it is also a member of the Admidio class, which is also an argument of Group. --- admidio.py | 2 +- group.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admidio.py b/admidio.py index 6596e18..b03c3db 100644 --- a/admidio.py +++ b/admidio.py @@ -62,7 +62,7 @@ class Admidio: self.cursor.execute(sql) for row in self.cursor.fetchall(): - self.groups[row[0]] = group.Group(self.db, row[0], row[1], self) + self.groups[row[0]] = group.Group(row[0], row[1], self) def initEvents(self): """Initialises all comming events and passed events <3 months""" diff --git a/group.py b/group.py index b623eb6..17bdd06 100644 --- a/group.py +++ b/group.py @@ -2,8 +2,8 @@ from admidio_python_api.exceptions import MemberNotFoundException class Group: - def __init__(self, db, group_id, name, admidio): - self.__c = db.cursor() + def __init__(self, group_id, name, admidio): + self.__c = admidio.db.cursor() self.id = group_id self.name = name self.admidio = admidio