diff --git a/app/config.py.default b/app/config.py.default index bf10876..23dc956 100644 --- a/app/config.py.default +++ b/app/config.py.default @@ -10,7 +10,8 @@ from typing import Any, Dict, List, Optional, Union class Settings(BaseSettings): AETHER_CFG = {} AETHER_CFG['id'] = 0 - AETHER_CFG['api_id'] = 0 + # AETHER_CFG['api_id'] = 0 # NOT CURRENTLY NEED OR USED + # APP_NAME: str = "Aether API (FastAPI)" # SUPER_EMAIL: EmailStr = 'Aether.Super@oneskyit.com' @@ -53,7 +54,7 @@ class Settings(BaseSettings): # CORS Origins - ORIGINS_REGEX = '(https://.*\.oneskyit\.com)|(http://.*\.oneskyit\.com:8181)|(https://.*\.oneskyit\.com:8443)' + ORIGINS_REGEX = '(https://.*\.oneskyit\.com)|(http://.*\.oneskyit\.com:8181)|(https://.*\.oneskyit\.com:4443)|(https://.*\.oneskyit\.com:8443)' # A reasonable, but fairly open example regular expression for the CORS origins: # '(https://.*\.oneskyit\.com)|(http://.*\.oneskyit\.com)|(http://.*\.oneskyit\.com:8181)|(https://.*\.oneskyit\.com:8443)|(http://.*\.oneskyit\.local)|(http://.*\.oneskyit\.local:5000)|(http://.*.localhost)|(http://.*.localhost:5000)|(http://.*.localhost:8181)' diff --git a/app/models/api_models.py b/app/models/api_models.py index 79cb3a2..e334e0b 100644 --- a/app/models/api_models.py +++ b/app/models/api_models.py @@ -1,11 +1,10 @@ -from __future__ import annotations -import datetime, hashlib, logging, os, pytz, redis, secrets +import datetime, pytz, secrets from typing import Dict, List, Optional, Set, Union from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator from app.db_sql import redis_lookup_id_random -from app.lib_general import * +from app.lib_general import log, logging from app.models.common_field_schema import base_fields, default_num_bytes @@ -49,6 +48,4 @@ class Api_Base(BaseModel): class Config: underscore_attrs_are_private = True allow_population_by_field_name = True - #fields = base_fields - -#Account_Base.update_forward_refs() + # fields = base_fields diff --git a/app/models/core_object_models.py b/app/models/core_object_models.py index 1d52243..bec6662 100644 --- a/app/models/core_object_models.py +++ b/app/models/core_object_models.py @@ -1,11 +1,10 @@ -from __future__ import annotations -import datetime, hashlib, logging, os, pytz, redis, secrets +import datetime, pytz from typing import Dict, List, Optional, Set, Union from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator from app.db_sql import redis_lookup_id_random -from app.lib_general import * +from app.lib_general import log, logging from app.common_field_schema import base_fields, default_num_bytes diff --git a/app/models/flask_cfg_models.py b/app/models/flask_cfg_models.py index 5e2c9bd..eecd5c4 100644 --- a/app/models/flask_cfg_models.py +++ b/app/models/flask_cfg_models.py @@ -1,13 +1,12 @@ -from __future__ import annotations -import datetime, hashlib, logging, os, pytz, redis, secrets +import datetime, pytz, secrets from typing import Dict, List, Optional, Set, Union from pydantic import BaseModel, EmailStr, Field, Json, PrivateAttr, ValidationError, validator from app.db_sql import redis_lookup_id_random -from app.lib_general import * +from app.lib_general import log, logging -from .common_field_schema import base_fields, default_num_bytes +from app.models.common_field_schema import base_fields, default_num_bytes class Flask_Cfg_Base(BaseModel): diff --git a/app/routers/e_impexium.py b/app/routers/e_impexium.py index 94968ce..9076190 100644 --- a/app/routers/e_impexium.py +++ b/app/routers/e_impexium.py @@ -441,6 +441,11 @@ async def event_import_reg( if (field.get('value') != 'False'): event_badge_data['other_1'] = field.get('value') + if field.get('name') == 'am_past_attendance' and field.get('value'): # == 'First Time ' + log.info('Past Attendance') + if (field.get('value') != 'False'): + event_badge_data['other_2'] = field.get('value') + # customerType seems to only be I or G. G is for guests. I seems to be for members and non-members. # event_badge_data['member_type_code'] = event_registrant.get('customerType') # Using this as the member_type. Will update below if possible