On sauve l'événement dès qu'il est récupéré, même sans modification

This commit is contained in:
Jean-Marie Favreau 2024-08-13 15:53:06 +02:00
parent 2b63a79c5d
commit c0c459a213
2 changed files with 6 additions and 5 deletions

View File

@ -704,11 +704,11 @@ msgstr ""
#: agenda_culturel/views.py:543 #: agenda_culturel/views.py:543
msgid "" msgid ""
"The event has been successfully extracted, and you can now submit it after " "The event has been successfully extracted, and you can now modify it if "
"modifying it if necessary." "necessary"
msgstr "" msgstr ""
"L'événement a été extrait avec succès, vous pouvez maintenant le soumettre " "L'événement a été extrait avec succès, vous pouvez maintenant le modifier "
"après l'avoir modifié au besoin." "au besoin."
#: agenda_culturel/views.py:559 #: agenda_culturel/views.py:559
msgid "" msgid ""

View File

@ -573,6 +573,7 @@ def import_from_url(request):
# TODO: use celery to import the other events # TODO: use celery to import the other events
if event is not None: if event is not None:
event.save()
form = EventForm( form = EventForm(
instance=event, instance=event,
is_authenticated=request.user.is_authenticated, is_authenticated=request.user.is_authenticated,
@ -580,7 +581,7 @@ def import_from_url(request):
messages.success( messages.success(
request, request,
_( _(
"The event has been successfully extracted, and you can now submit it after modifying it if necessary." "The event has been successfully extracted, and you can now modify it if necessary."
), ),
) )
return render( return render(