Moving things to use the common_route_params. Rewriting most of things order and order_cart related! Updating address and contact related. General code clean up.
This commit is contained in:
@@ -12,6 +12,7 @@ from app.models.common_field_schema import default_num_bytes
|
||||
|
||||
|
||||
# ### BEGIN ### API Address Methods ### load_address_obj() ###
|
||||
@logger_reset
|
||||
def load_address_obj(
|
||||
address_id:int|str,
|
||||
enabled: str = 'enabled', # enabled, disabled, all # Probably not needed for the address
|
||||
@@ -54,7 +55,7 @@ def get_address_rec_list(
|
||||
limit: int = 500,
|
||||
offset: int = 0,
|
||||
) -> list|bool:
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if for_id := redis_lookup_id_random(record_id_random=for_id, table_name=for_type): pass
|
||||
@@ -98,6 +99,7 @@ def get_address_rec_list(
|
||||
# ### BEGIN ### API Address Methods ### create_update_address_obj_v4() ###
|
||||
# NOTE: This will create or update an address.
|
||||
# Rewrite and updated 2021-08-25
|
||||
@logger_reset
|
||||
def create_update_address_obj_v4(
|
||||
address_dict_obj: Address_Base|dict,
|
||||
address_id: int|str = None,
|
||||
@@ -221,6 +223,7 @@ def create_update_address_obj_v4(
|
||||
|
||||
# ### BEGIN ### API Address Methods ### create_address_obj() ###
|
||||
# Updated 2022-01-06
|
||||
@logger_reset
|
||||
def create_address_obj(
|
||||
account_id: int|str,
|
||||
address_dict_obj: Address_Base,
|
||||
@@ -295,6 +298,7 @@ def create_address_obj(
|
||||
|
||||
# ### BEGIN ### API Address Methods ### update_address_obj() ###
|
||||
# Updated 2022-01-06
|
||||
@logger_reset
|
||||
def update_address_obj(
|
||||
address_id: int|str, # Ideally the int ID should be passed. This allows for updating of the id_random value.
|
||||
address_dict_obj: Address_Base,
|
||||
@@ -361,6 +365,7 @@ def update_address_obj(
|
||||
|
||||
|
||||
# ### BEGIN ### API Address Methods ### create_update_address_obj() ###
|
||||
@logger_reset
|
||||
def create_update_address_obj(
|
||||
address_id: int|str|None, # Ideally the int ID should be passed. This allows for updating of the id_random value.
|
||||
address_obj: Address_Base,
|
||||
|
||||
Reference in New Issue
Block a user