Skip to content

Commit

Permalink
single cell line lookup index fix (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
daanvaningen authored Dec 5, 2023
1 parent aeb900d commit ed1f5d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ History

- Nothing changed yet.

- Fix Lines lookup index bug for single cell models


2.2.0 (2023-11-07)
------------------
Expand Down
5 changes: 4 additions & 1 deletion threedigrid/admin/h5py_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def execute_query(self, model):
timeseries_filter = model.get_timeseries_mask_filter()

if model._mixin and hasattr(model.Meta, "lookup_fields"):
lookup_index = model._meta._get_lookup_index()
try: # Single cell models don't have Lines
lookup_index = model._meta._get_lookup_index()
except AttributeError:
return np.array([])

if model._mixin and hasattr(model.Meta, "subset_fields"):
has_subsets = True
Expand Down

0 comments on commit ed1f5d3

Please sign in to comment.