Skip to content

Commit

Permalink
#3322: Fix potential RelatedObjectDoesNotExist exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromsl committed Dec 19, 2022
1 parent c8ba042 commit 1731e99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/submission/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,9 @@ def get_remote_url(self, request):

def step_to_url(self):
funding_enabled = False
if self.journal and self.journal.submissionconfiguration:
if self.journal and getattr(
self.journal, "submissionconfiguration", None
):
funding_enabled = self.journal.submissionconfiguration.funding

if self.current_step == 1:
Expand All @@ -1154,7 +1156,9 @@ def step_to_url(self):

def step_name(self):
funding_enabled = False
if self.journal and self.journal.submissionconfiguration:
if self.journal and getattr(
self.journal, "submissionconfiguration", None
):
funding_enabled = self.journal.submissionconfiguration.funding
if self.current_step == 1:
return 'Article Information'
Expand Down

0 comments on commit 1731e99

Please sign in to comment.