Work on person, user, contact, address improvements
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_insert, sql_select, sql_update
|
||||
from app.lib_general import log, logging, send_email
|
||||
from app.lib_general import log, logging, logger_reset, send_email
|
||||
|
||||
# from app.methods.account_methods import load_account_cfg_obj
|
||||
from app.methods.contact_methods import load_contact_obj, update_contact_obj
|
||||
@@ -299,7 +299,7 @@ def load_user_obj(
|
||||
# inc_address = inc_address,
|
||||
# ):
|
||||
# user_obj.contact = contact_result
|
||||
# else: user_obj.contact = None
|
||||
# else: user_obj.contact = {} # None
|
||||
|
||||
if inc_event_list:
|
||||
log.warning(f'This is being deprecated? load_user_obj() inc_event_list')
|
||||
@@ -340,7 +340,7 @@ def load_user_obj(
|
||||
user_obj.order_list = order_result_list
|
||||
else: user_obj.order_list = []
|
||||
|
||||
# Updated 2021-06-18
|
||||
# Updated 2021-12-14
|
||||
if inc_organization:
|
||||
log.warning(f'This is being deprecated? load_user_obj() inc_organization')
|
||||
organization_id = user_rec.get('organization_id', None)
|
||||
@@ -356,9 +356,9 @@ def load_user_obj(
|
||||
inc_contact = inc_contact,
|
||||
):
|
||||
user_obj.organization = organization_result
|
||||
else: user_obj.organization = None
|
||||
else: user_obj.organization = {} # None
|
||||
|
||||
# Updated 2021-06-18
|
||||
# Updated 2021-12-14
|
||||
if inc_person:
|
||||
person_id = user_rec.get('person_id', None)
|
||||
log.debug(person_id)
|
||||
@@ -372,7 +372,7 @@ def load_user_obj(
|
||||
inc_organization = inc_organization,
|
||||
):
|
||||
user_obj.person = person_result
|
||||
else: user_obj.person = None
|
||||
else: user_obj.person = {} # None
|
||||
log.debug(person_result)
|
||||
|
||||
# Updated 2021-06-18
|
||||
@@ -434,6 +434,7 @@ def load_user_obj(
|
||||
|
||||
# ### BEGIN ### API User Methods ### get_user_rec_list() ###
|
||||
# Updated 2021-12-13
|
||||
@logger_reset
|
||||
def get_user_rec_list(
|
||||
account_id: int|str,
|
||||
hidden: str = 'not_hidden', # hidden, not_hidden, all
|
||||
|
||||
Reference in New Issue
Block a user