Skip to content
Snippets Groups Projects
Commit 2dc28493 authored by permcu's avatar permcu
Browse files

Consider different related names for personal_notes

parent cccfa48a
No related branches found
No related tags found
1 merge request!422Resolve "Add export functionality to course book"
...@@ -170,9 +170,9 @@ def generate_full_register_printout( ...@@ -170,9 +170,9 @@ def generate_full_register_printout(
.prefetch_related(*prefetch_related), .prefetch_related(*prefetch_related),
) )
def prefetch_personal_notes(*prefetch_related): def prefetch_personal_notes(name, *prefetch_related):
return Prefetch( return Prefetch(
"new_personal_notes", name,
queryset=NewPersonalNote.objects queryset=NewPersonalNote.objects
.exclude( .exclude(
Q(note="") Q(note="")
...@@ -228,6 +228,7 @@ def generate_full_register_printout( ...@@ -228,6 +228,7 @@ def generate_full_register_printout(
) )
), ),
prefetch_personal_notes( prefetch_personal_notes(
"new_personal_notes",
Prefetch( Prefetch(
"documentation", "documentation",
queryset=doc_query_set, queryset=doc_query_set,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment