We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bff958 commit 884a24aCopy full SHA for 884a24a
1 file changed
osf/models/preprint.py
@@ -407,7 +407,7 @@ def check_unfinished_or_unpublished_version(self):
407
"""Check and return the "initiated but unfinished version" and "unfinished or unpublished version".
408
"""
409
last_not_rejected_version = self.get_last_not_rejected_version()
410
- if last_not_rejected_version.date_published:
+ if not last_not_rejected_version or last_not_rejected_version.date_published:
411
return None, None
412
if last_not_rejected_version.machine_state == 'initial':
413
return last_not_rejected_version, None
0 commit comments