mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Use static dbcusor
This commit is contained in:
@@ -80,7 +80,9 @@ class BaseDBService(BaseService):
|
||||
|
||||
@property
|
||||
def _dbcursor(self):
|
||||
return self._db.cursor()
|
||||
if not hasattr(self, '__dbcursor'):
|
||||
self.__dbcursor = self._db.cursor()
|
||||
return self.__dbcursor
|
||||
|
||||
def __del__(self):
|
||||
if hasattr(self, '_db'):
|
||||
|
||||
Reference in New Issue
Block a user