Fix server starting

This commit is contained in:
Yohann D'ANELLO 2020-03-27 16:32:46 +01:00
parent f09364d3d8
commit 4f4bbf6d0e
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ class TransactionTemplateForm(forms.ModelForm):
NoteClub, NoteClub,
attrs={ attrs={
'api_url': '/api/note/note/', 'api_url': '/api/note/note/',
'api_url_suffix': '&polymorphic_ctype=' + str(ContentType.objects.get_for_model(NoteClub).pk), # We don't evaluate the content type at launch because the DB might be not initialized
'api_url_suffix':
lambda value: '&polymorphic_ctype=' + str(ContentType.objects.get_for_model(NoteClub).pk),
'placeholder': 'Note ...', 'placeholder': 'Note ...',
}, },
), ),