Skip to content

Commit 968ed97

Browse files
committed
Update to accept resource ResourceBase rather than Resource
1 parent 7c741fa commit 968ed97

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/odin/filtering.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99

1010
class FilterAtom(abc.ABC):
11-
"""
12-
Base filter statement
13-
"""
11+
"""Base filter statement"""
1412

1513
__slots__ = ()
1614

src/odin/resources.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ def composite_fields(self) -> Sequence[Field]:
171171
"""All composite fields."""
172172
# Not the nicest solution but is a fairly safe way of detecting a composite field.
173173
return tuple(
174-
f for f in self.fields if (hasattr(f, "of") and issubclass(f.of, Resource))
174+
f
175+
for f in self.fields
176+
if (hasattr(f, "of") and issubclass(f.of, ResourceBase))
175177
)
176178

177179
@cached_property

0 commit comments

Comments
 (0)