Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions app/filters/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class CircuitFilterMixin:
build_category__in: list[CircuitBuildCategory] | None = None

target_simulator: TargetSimulator | None = None
target_simulator__in: list[TargetSimulator] | None = None


class NestedCircuitFilter(
Expand Down
10 changes: 10 additions & 0 deletions tests/test_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,16 @@ def test_filtering(client, root_circuit, models):
).json()["data"]
assert len(data) == 2 # 2 of the 6 children use NEURON; root_circuit uses CORENEURON

data = assert_request(
client.get,
url=ROUTE,
params={
"root_circuit_id": str(root_circuit.id),
"target_simulator__in": [TargetSimulator.neuron, TargetSimulator.brian2],
},
).json()["data"]
assert len(data) == 3 # NEURON x2 + Brian2 x1 among the children

data = assert_request(
client.get,
url=ROUTE,
Expand Down