SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 45a62edc authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Fix arXiv auto-found pdf is already byte type

parent 7a28ceef
No related branches found
No related tags found
No related merge requests found
......@@ -672,7 +672,7 @@ class iThenticateReportForm(forms.ModelForm):
' Please upload the pdf manually.'))
self.fields['file'] = forms.FileField()
elif not doc_id and cleaned_data.get('file'):
cleaned_data['document'] = cleaned_data['file']
cleaned_data['document'] = cleaned_data['file'].read()
elif doc_id:
self.document_id = doc_id
......@@ -743,7 +743,7 @@ class iThenticateReportForm(forms.ModelForm):
# Finally, upload the file
author = self.submission.authors.first()
response = client.documents.add(
self.document.read(),
self.document,
folder_id,
author.user.first_name,
author.user.last_name,
......
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