Skip to content

Commit

Permalink
published and draft records share the same facets
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Krist committed May 29, 2024
1 parent 8deb8c3 commit 55e1ce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def before_model_prepare(self, datatype, *, context, **kwargs):
record_draft_search_prefix = datatype.definition["module"]["prefix"]

if datatype.root.profile == "draft":
# published and draft records share the same facets, that's why we use the same prefix
record_draft_search_prefix = context["published_record"].definition[
"module"
]["prefix"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

class {{ published_record.service_config|class_header }}:
draft_cls = {{ draft_record.record.class|base_name }}
search_drafts = {{ draft_record.search_options.class|base_name }} #todo is this correct?
search_drafts = {{ published_record.search_options.class|base_name }}

0 comments on commit 55e1ce0

Please sign in to comment.