Minor update for ISHLT Impexium import

This commit is contained in:
Scott Idem
2023-02-27 17:04:45 -05:00
parent 3ec8e8ca2c
commit ab8e1b8899
5 changed files with 16 additions and 15 deletions

View File

@@ -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)'

View File

@@ -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

View File

@@ -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

View File

@@ -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):

View File

@@ -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