A lot of code clean up
This commit is contained in:
@@ -283,7 +283,12 @@ def create_address_obj(
|
||||
return False
|
||||
else: log.info(f'No existing address found with: For Type: {for_type}; For ID: {for_id}')
|
||||
|
||||
if address_dict_in_result := sql_insert(data=address_dict, table_name='address', rm_id_random=True, id_random_length=8): pass
|
||||
if address_dict_in_result := sql_insert(
|
||||
data = address_dict,
|
||||
table_name = 'address',
|
||||
rm_id_random = True,
|
||||
id_random_length = default_num_bytes
|
||||
): pass
|
||||
else:
|
||||
return False
|
||||
|
||||
@@ -352,7 +357,11 @@ def update_address_obj(
|
||||
|
||||
# address_dict = address_dict_obj.dict(by_alias=False, exclude_unset=True)
|
||||
|
||||
if address_dict_up_result := sql_update(data=address_dict, table_name='address', rm_id_random=True): pass
|
||||
if address_dict_up_result := sql_update(
|
||||
data = address_dict,
|
||||
table_name = 'address',
|
||||
rm_id_random = True
|
||||
): pass
|
||||
else:
|
||||
log.warning(f'Address not updated.')
|
||||
log.debug(address_dict_up_result)
|
||||
|
||||
Reference in New Issue
Block a user