Skip to content

Implement attach_runs functionality for studies #211

@lucifer4330k

Description

@lucifer4330k

Description

The attach_runs function in src/database/studies.py is currently not implemented and raises NotImplementedError.

Location

src/database/studies.py:171

def attach_runs(
    study_id: int,
    run_ids: list[int],
    user: User,
    connection: Connection,
) -> None:
    raise NotImplementedError

Expected Behavior

The function should attach multiple runs to a study, similar to how attach_run and attach_tasks work.

Impact

This prevents users from attaching runs to studies programmatically in batch operations.

Suggested Implementation

Follow the pattern used in attach_tasks function (lines 143-164) which validates study ownership and inserts multiple records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions