Browse Source

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.
master
Dennis Potter 5 years ago
parent
commit
c4ab7b12f6
Signed by: d.potter GPG Key ID: 186A8AD440942BAF
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      admidio.py
  2. +2
    -2
      group.py

+ 1
- 1
admidio.py View File

@ -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"""


+ 2
- 2
group.py View File

@ -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


Loading…
Cancel
Save