Fix: Make forced account filtering schema-aware to prevent crashes on specialized views

This commit is contained in:
Scott Idem
2026-01-19 17:17:34 -05:00
parent 579772977b
commit ab8afb72d2
3 changed files with 24 additions and 6 deletions

View File

@@ -216,7 +216,7 @@ async def get_obj_li(
order_by_li = filter_order_by(order_by_li, base_name, table_name)
status_filter = get_supported_filters(base_name, status_filter)
and_qry_dict_obj = apply_forced_account_filter(and_qry_dict_obj, account, base_name, obj_name)
and_qry_dict_obj = apply_forced_account_filter(and_qry_dict_obj, account, base_name, obj_name, table_name=table_name)
if for_obj_type and for_obj_id:
resolved_for_obj_id = redis_lookup_id_random(record_id_random=for_obj_id, table_name=for_obj_type)

View File

@@ -98,7 +98,7 @@ async def get_child_obj_li(
else:
return mk_resp(data=False, status_code=404, response=response, status_message="Parent not found.")
and_qry_dict_obj = apply_forced_account_filter(and_qry_dict_obj, account, base_name, obj_name)
and_qry_dict_obj = apply_forced_account_filter(and_qry_dict_obj, account, base_name, obj_name, table_name=table_name)
sql_result = sql_select(
table_name=table_name,