feat(data_store): implement V3 cascading lookup and ID Vision standardization
- Added GET /v3/data_store/code/{code} with hierarchical context-aware fallback.
- Implemented ID Vision standard in Data_Store_Base (string IDs, internal int exclusion).
- Enhanced Data_Store_Base robustness to handle stringified 'NULL' values from the database.
- Fixed legacy router bugs by removing undefined parameters (inc_event_cfg, inc_event_location).
- Corrected type hints and resolved UnboundLocalError in data_store methods.
- Updated Frontend Integration Guide with Section 8: Data Store V3.
- Added unified E2E test script: tests/e2e/test_e2e_v3_data_store_lookup.py.
This commit is contained in:
@@ -55,7 +55,7 @@ def load_data_store_obj(
|
||||
def load_data_store_obj_w_code(
|
||||
account_id: int,
|
||||
code: str,
|
||||
for_type: int = None,
|
||||
for_type: str = None,
|
||||
for_id: int = None,
|
||||
enabled: str = 'enabled', # enabled, disabled, all
|
||||
limit: int = 1,
|
||||
@@ -123,11 +123,11 @@ def load_data_store_obj_w_code(
|
||||
try:
|
||||
data_store_obj = Data_Store_Base(**data_store_rec)
|
||||
data_store_obj_li.append(data_store_obj)
|
||||
log.debug(data_store_obj)
|
||||
except ValidationError as e:
|
||||
log.error(e.json())
|
||||
data_store_obj_li.append(None)
|
||||
# return False
|
||||
log.debug(data_store_obj)
|
||||
else: pass
|
||||
|
||||
log.info(f'Found {len(data_store_obj_li)} Data Store records with code: {code} for Account ID: {account_id} and For Type: {for_type} and For ID: {for_id}')
|
||||
|
||||
Reference in New Issue
Block a user