Skip to content

Commit

Permalink
Add a demo UploadedDocument (#2241)
Browse files Browse the repository at this point in the history
Add an UploadedDocument object and file to the database, for testing
purposes. Use this as a test case for `serve_document`.
  • Loading branch information
tompollard authored May 23, 2024
2 parents 1faaab8 + 15a9991 commit 5492fdb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To whom it may concern:

The study described here has been approved and poses no ethical
concerns.

The Authorities
13 changes: 13 additions & 0 deletions physionet-django/project/fixtures/demo-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -2280,5 +2280,18 @@
"responder": null,
"responder_comments": ""
}
},
{
"model": "project.uploadeddocument",
"pk": 1,
"fields": {
"document_type": 1,
"content_type": [
"project",
"activeproject"
],
"object_id": 1,
"document": "ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt"
}
}
]
4 changes: 1 addition & 3 deletions physionet-django/project/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@
'_query_': {'subdir': 'notes'},
},
'serve_document': {
# missing UploadedDocument in demo
'_skip_': True,
'file_name': 'Ethics_Approval_57e9ba85-eb58-4da5-a86f-2b653ba17cf4.pdf',
'file_name': 'ethics/Ethics_Approval_567b029d-9ea6-41b8-b738-bf45675b24ce.txt',
},
'published_project_request_access': {
# missing DataAccess in demo
Expand Down

0 comments on commit 5492fdb

Please sign in to comment.