We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9bff958 + 884a24a commit 0428d8bCopy full SHA for 0428d8b
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