Working on order, carts, and Stripe
This commit is contained in:
@@ -18,7 +18,7 @@ def create_order_obj_line(
|
||||
order_id: int,
|
||||
order_line_dict_obj: Order_Line_Base,
|
||||
) -> int|bool:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
# ### SECTION ### Secondary data validation
|
||||
@@ -92,7 +92,7 @@ def update_order_obj_line(
|
||||
order_line_id: int,
|
||||
order_line_dict_obj: Order_Line_Base,
|
||||
) -> int|bool:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
# ### SECTION ### Secondary data validation
|
||||
@@ -471,7 +471,7 @@ def remove_order_obj_line(
|
||||
order_line_id: int,
|
||||
product_id: int,
|
||||
) -> bool|None:
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
# ### SECTION ### Secondary data validation
|
||||
|
||||
@@ -170,11 +170,14 @@ def update_person_kiss(
|
||||
|
||||
# Look for a contact_id in the contact_obj
|
||||
if contact_id: pass
|
||||
elif contact_id := person_obj.contact.id: pass
|
||||
elif person_obj.contact:
|
||||
contact_id = person_obj.contact.id
|
||||
|
||||
# Look for a user_id in the person_obj
|
||||
if user_id: pass
|
||||
elif user_id := person_obj.user.id: pass
|
||||
elif person_obj.user:
|
||||
user_id = person_obj.user.id
|
||||
|
||||
# if user_id:
|
||||
# # Link to an existing user
|
||||
# log.info(f'Adding user_id to person_dict. User ID: {user_id}')
|
||||
|
||||
@@ -94,6 +94,8 @@ class Person_Base(BaseModel):
|
||||
external_id: Optional[str]
|
||||
external_import_id: Optional[str]
|
||||
|
||||
stripe_customer_id: Optional[str]
|
||||
|
||||
allow_auth_key: Optional[bool]
|
||||
auth_key: Optional[str]
|
||||
|
||||
@@ -106,7 +108,7 @@ class Person_Base(BaseModel):
|
||||
created_on: Optional[datetime.datetime] = None
|
||||
updated_on: Optional[datetime.datetime] = None
|
||||
|
||||
test_field: str = 'asdf 1234'
|
||||
test_field: str = 'abcd 1234'
|
||||
|
||||
# Including convenience data
|
||||
# This is only for convenience. Probably going to keep unless it causes a problem.
|
||||
|
||||
@@ -340,7 +340,7 @@ async def get_person_obj(
|
||||
inc_user: bool = False, # Priority l1
|
||||
commons: Common_Route_Params = Depends(common_route_params),
|
||||
):
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if person_id := redis_lookup_id_random(record_id_random=person_id, table_name='person'): pass
|
||||
|
||||
Reference in New Issue
Block a user