Documents: Allow version upload task stubs access
Update which Document model manager the new version upload task uses to fetch the document. Changing to the passthrough manager allows the task to access document stubs which is the expected behavior as new document with no versions are considered stubs. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -179,7 +179,7 @@ def task_upload_new_version(self, document_id, shared_uploaded_file_id, user_id,
|
||||
)
|
||||
|
||||
try:
|
||||
document = Document.objects.get(pk=document_id)
|
||||
document = Document.passthrough.get(pk=document_id)
|
||||
shared_file = SharedUploadedFile.objects.get(
|
||||
pk=shared_uploaded_file_id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user