Skip to content
Snippets Groups Projects
Commit 5f18cf7c authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

The Download button should download the main protocol pdf

parent bb305412
No related branches found
No related tags found
No related merge requests found
...@@ -382,7 +382,7 @@ class Protocol(DatabaseModel): ...@@ -382,7 +382,7 @@ class Protocol(DatabaseModel):
def has_compiled_document(self, private=None): def has_compiled_document(self, private=None):
candidates = [ candidates = [
document for document in self.documents document for document in self.documents
if document.is_compiled if document.is_compiled and not document.is_extra
and (private is None or document.is_private == private) and (private is None or document.is_private == private)
] ]
return len(candidates) > 0 return len(candidates) > 0
...@@ -390,7 +390,7 @@ class Protocol(DatabaseModel): ...@@ -390,7 +390,7 @@ class Protocol(DatabaseModel):
def get_compiled_document(self, private=None): def get_compiled_document(self, private=None):
candidates = [ candidates = [
document for document in self.documents document for document in self.documents
if document.is_compiled if document.is_compiled and not document.is_extra
] ]
private_candidates = [ private_candidates = [
document for document in candidates document for document in candidates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment