fix uuid in message data

This commit is contained in:
Laura Klünder 2024-03-29 19:52:08 +01:00
parent aa580670ea
commit fbed425b1a
2 changed files with 3 additions and 1 deletions

View file

@ -80,6 +80,8 @@ class MeshMessageForm(forms.Form):
def get_cleaned_msg_data(self):
msg_data = self.cleaned_data.copy()
msg_data.pop('recipients', None)
if "uuid" in msg_data:
msg_data["uuid"] = str(msg_data["uuid"])
return msg_data
def get_msg_data(self):

View file

@ -103,7 +103,7 @@ class MeshMessageSendView(MeshControlMixin, FormView):
if 'noscript' in self.request.POST:
form.send()
messages.success(self.request, _('Message sent successfully(?)'))
super().form_valid(form)
return super().form_valid(form)
uuid = uuid4()
self.request.session["mesh_msg_%s" % uuid] = {
"success_url": self.get_success_url(),