Fixing qml connection to save business with a new contact - some
database modifications
This commit is contained in:
@@ -5,16 +5,16 @@ import mariadb
|
||||
|
||||
class ContactDAO:
|
||||
def __init__(self):
|
||||
print(f"*** File: {__file__}, __init__()")
|
||||
#print(f"*** File: {__file__}, __init__()")
|
||||
self.__con = DbManager().getConnection()
|
||||
self.__cur = self.__con.cursor()
|
||||
|
||||
def getContacts(self):
|
||||
print(f"*** File: {__file__}, getContacts()")
|
||||
|
||||
def addContact(self, contact):
|
||||
def addContact(self, contact, enc_key):
|
||||
try:
|
||||
self.__cur.callproc("addContactPerson", (json.dumps(contact),))
|
||||
self.__cur.callproc("addContactPerson", (enc_key, json.dumps(contact),))
|
||||
self.__con.commit()
|
||||
self.__cur.callproc("getLastInsertId")
|
||||
contact_id = self.__cur.fetchone()
|
||||
|
||||
Reference in New Issue
Block a user