-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNO-177-add-view-with-specified-fields #300
Conversation
src/snovault/auditor.py
Outdated
@@ -244,8 +244,9 @@ def item_view_audit(context, request): | |||
path = request.resource_path(context) | |||
properties = request.embed(path, '@@object') | |||
inherit = context.audit_inherit | |||
if context.embedded and '*' in context.audit_inherit: | |||
inherit = context.embedded | |||
embedded_paths = list(context.embedded) + [p.path for p in context.embedded_with_frame] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple places where we have to iterate over these paths. Think I could make this cleaner by just having a property that implements this logic once instead of leaking internals every time we have to do this.
src/snovault/auditor.py
Outdated
@@ -244,8 +244,9 @@ def item_view_audit(context, request): | |||
path = request.resource_path(context) | |||
properties = request.embed(path, '@@object') | |||
inherit = context.audit_inherit | |||
if context.embedded and '*' in context.audit_inherit: | |||
inherit = context.embedded | |||
embedded_paths = list(context.embedded) + [p.path for p in context.embedded_with_frame] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does context.embedded_with_frame
raise an exception if the context doesn't have it set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Shouldn't have any functional change, put embedded and embedded_with_frame iteration logic in embedded_paths |
756b156
to
a72053a
Compare
No description provided.