Skip to content

Commit

Permalink
Use classmethod so TypeInfo can access
Browse files Browse the repository at this point in the history
  • Loading branch information
keenangraham committed Oct 27, 2020
1 parent 9930a8e commit a72053a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/snovault/auditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def item_view_audit(context, request):
path = request.resource_path(context)
properties = request.embed(path, '@@object')
inherit = context.audit_inherit
embedded_paths = context.embedded_paths
embedded_paths = context.embedded_paths()
if embedded_paths and '*' in context.audit_inherit:
inherit = embedded_paths
else:
Expand Down
8 changes: 4 additions & 4 deletions src/snovault/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ def uuid(self):
def tid(self):
return self.model.tid

@property
def embedded_paths(self):
@classmethod
def embedded_paths(cls):
return list(
chain(
self.embedded,
cls.embedded,
(
p.path
for p in self.embedded_with_frame
for p in cls.embedded_with_frame
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion src/snovault/typeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, registry, item_type, factory):
self.base_types = factory.base_types
self.embedded = factory.embedded
self.embedded_with_frame = factory.embedded_with_frame
self.embedded_paths = factory.embedded_paths
self.embedded_paths = factory.embedded_paths()

@reify
def calculated_properties(self):
Expand Down

0 comments on commit a72053a

Please sign in to comment.