diff --git a/journal/models.py b/journal/models.py index 5cfbc484..407b2d9c 100644 --- a/journal/models.py +++ b/journal/models.py @@ -174,8 +174,8 @@ def data(self): issn_print=self.official_journal.issn_print, issn_electronic=self.official_journal.issn_electronic, foundation_year=self.official_journal.foundation_year, - created=created.isoformat(), - updated=updated.isoformat(), + created=self.created.isoformat(), + updated=self.updated.isoformat(), ) def autocomplete_label(self): diff --git a/proc/controller.py b/proc/controller.py index daa504d7..cde9921d 100644 --- a/proc/controller.py +++ b/proc/controller.py @@ -74,10 +74,15 @@ def create_or_update_issue( return issue_proc.issue classic_website_issue = classic_ws.Issue(issue_proc.migrated_data.data) - journal_proc = JournalProc.get( - collection=issue_proc.collection, - pid=classic_website_issue.journal, - ) + try: + journal_proc = JournalProc.get( + collection=issue_proc.collection, + pid=classic_website_issue.journal, + ) + except JournalProc.DoesNotExist: + raise ValueError( + f"Unable to get journal_proc for issue_proc: {issue_proc}, collection: {issue_proc.collection}, pid={classic_website_issue.journal}" + ) if not journal_proc.journal: raise ValueError(f"Missing JournalProc.journal for {journal_proc}")