A lot of code clean up

This commit is contained in:
Scott Idem
2022-01-18 20:03:46 -05:00
parent d6caa819b0
commit 3d2c7282dd
10 changed files with 722 additions and 440 deletions

View File

@@ -366,7 +366,12 @@ def create_contact_obj(
if address_id: pass
# elif address_id := contact_obj.address.id: pass
if contact_dict_in_result := sql_insert(data=contact_dict, table_name='contact', rm_id_random=True, id_random_length=8): pass
if contact_dict_in_result := sql_insert(
data = contact_dict,
table_name = 'contact',
rm_id_random = True,
id_random_length = default_num_bytes
): pass
else:
return False
@@ -489,7 +494,11 @@ def update_contact_obj(
log.debug(contact_obj.address.id)
log.debug(contact_obj.address.id_random)
if contact_dict_up_result := sql_update(data=contact_dict, table_name='contact', rm_id_random=True): pass
if contact_dict_up_result := sql_update(
data=contact_dict,
table_name='contact',
rm_id_random=True
): pass
else:
log.warning(f'Contact not updated.')
log.debug(contact_dict_up_result)