Added start blocke on no database connection available
This commit is contained in:
@@ -13,13 +13,14 @@ class UserManager(QObject):
|
||||
def __init__(self, user_config = None, role = None):
|
||||
super().__init__()
|
||||
self.__con = DbManager().getConnection()
|
||||
self.__cur = self.__con.cursor()
|
||||
if user_config and role:
|
||||
if self.__con:
|
||||
self.__cur = self.__con.cursor()
|
||||
if user_config and role:
|
||||
|
||||
self.__username = user_config["PYQCRM_USER"]
|
||||
self.__password = user_config["PYQCRM_USER_PASS"]
|
||||
self.__info = user_config["PYQCRM_USER_INFO"]
|
||||
self.__role = role if role == PyqcrmFlags.ADMIN else 0
|
||||
self.__username = user_config["PYQCRM_USER"]
|
||||
self.__password = user_config["PYQCRM_USER_PASS"]
|
||||
self.__info = user_config["PYQCRM_USER_INFO"]
|
||||
self.__role = role if role == PyqcrmFlags.ADMIN else 0
|
||||
|
||||
|
||||
def createUser(self):
|
||||
|
||||
Reference in New Issue
Block a user