Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/dispatch/database/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,11 @@ def apply_filter_specific_joins(model: Base, filter_spec: dict, query: orm.query
if model_map.get((model, filter_model)):
joined_model, is_outer = model_map[(model, filter_model)]
try:
if joined_model not in joined_models:
# Use the model or table itself for tracking joins
Comment thread
whitdog47 marked this conversation as resolved.
model_or_table = getattr(joined_model, "parent", joined_model)
if model_or_table not in joined_models:
query = query.join(joined_model, isouter=is_outer)
joined_models.append(joined_model)
joined_models.append(model_or_table)
Comment thread
whitdog47 marked this conversation as resolved.
Comment thread
whitdog47 marked this conversation as resolved.
except Exception as e:
log.exception(e)

Expand Down
Loading