diff --git a/issue/models.py b/issue/models.py index af270dfd..9457f133 100644 --- a/issue/models.py +++ b/issue/models.py @@ -55,8 +55,8 @@ def data(self): number=self.number, supplement=self.supplement, publication_year=self.publication_year, - created=created.isoformat(), - updated=updated.isoformat(), + created=self.created.isoformat(), + updated=self.updated.isoformat(), ) @staticmethod diff --git a/proc/models.py b/proc/models.py index 45c6dce1..59d8acaf 100644 --- a/proc/models.py +++ b/proc/models.py @@ -6,7 +6,7 @@ from tempfile import TemporaryDirectory from django.core.files.base import ContentFile -from django.db import models +from django.db import models, IntegrityError from django.db.models import Q from django.utils.translation import gettext_lazy as _ from modelcluster.fields import ParentalKey