diff --git a/osf/models/preprint.py b/osf/models/preprint.py index f763d8d23cf..fe1e1ae8e59 100644 --- a/osf/models/preprint.py +++ b/osf/models/preprint.py @@ -407,7 +407,7 @@ def check_unfinished_or_unpublished_version(self): """Check and return the "initiated but unfinished version" and "unfinished or unpublished version". """ last_not_rejected_version = self.get_last_not_rejected_version() - if last_not_rejected_version.date_published: + if not last_not_rejected_version or last_not_rejected_version.date_published: return None, None if last_not_rejected_version.machine_state == 'initial': return last_not_rejected_version, None