diff --git a/newsletter/admin_forms.py b/newsletter/admin_forms.py index f3180290..da12ad04 100644 --- a/newsletter/admin_forms.py +++ b/newsletter/admin_forms.py @@ -175,6 +175,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) assert self.instance - next_sortorder = self.instance.get_next_article_sortorder() - for index, form in enumerate(self.extra_forms): - form.initial['sortorder'] = next_sortorder + index * 10 + if self.instance.pk: + next_sortorder = self.instance.get_next_article_sortorder() + for index, form in enumerate(self.extra_forms): + form.initial['sortorder'] = next_sortorder + index * 10