Skip to content

Commit

Permalink
Swap target to target_name in DDF constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiannonlynne committed Jan 23, 2025
1 parent c64bfb4 commit 1da7535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schedview/collect/opsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ def read_ddf_visits(
The visits and their parameters.
"""
ddf_field_names = tuple(ddf_locations().keys())
constraint = f"target IN {tuple(field_name for field_name in ddf_field_names)}"
# Note that this where clause is hard-coded for target_name (v4+)
# but other columns in query will be backwards-compatible.
constraint = f"target_name IN {tuple(field_name for field_name in ddf_field_names)}"
visits = read_opsim(
opsim_uri,
start_time=start_time,
Expand Down

0 comments on commit 1da7535

Please sign in to comment.