diff --git a/manuels/models.py b/manuels/models.py index 841bf67..2eb3ccd 100644 --- a/manuels/models.py +++ b/manuels/models.py @@ -290,8 +290,12 @@ class Book(BaseModel): potential_editor = ( Editor.objects.filter(name__iexact=editor).first() or Editor.objects.filter(name__icontains=editor).first() - or Editor.objects.get(name__istartswith="autre") ) + if potential_editor: + self.other_editor = "" + else: + potential_editor = Editor.objects.get(name__istartswith="autre") + self.other_editor = editor self.editor = potential_editor self.save()