Code clean up. Working on returning proper 404 vs 400 responses if the results are empty and nothing went wrong.
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Dict, List, Optional, Set, Union
|
||||
from pydantic import BaseModel, EmailStr, Field, PrivateAttr, ValidationError, validator
|
||||
|
||||
from app.db_sql import redis_lookup_id_random, sql_select
|
||||
from app.lib_general import log, logging
|
||||
from app.lib_general import log, logging, logger_reset
|
||||
|
||||
from app.methods.membership_cfg_methods import load_membership_cfg_obj
|
||||
|
||||
@@ -13,6 +13,7 @@ from app.models.account_cfg_models import Account_Cfg_Base
|
||||
|
||||
|
||||
# ### BEGIN ### API Account Cfg Methods ### load_account_cfg_obj() ###
|
||||
@logger_reset
|
||||
def load_account_cfg_obj(
|
||||
account_id: int|str,
|
||||
model_as_dict: bool = False,
|
||||
@@ -20,7 +21,7 @@ def load_account_cfg_obj(
|
||||
inc_fundraising_cfg: bool = False,
|
||||
inc_membership_cfg: bool = False,
|
||||
) -> Account_Cfg_Base|dict|bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if account_id := redis_lookup_id_random(record_id_random=account_id, table_name='account'): pass
|
||||
|
||||
Reference in New Issue
Block a user