Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
MizukiTemma committed Jan 22, 2025
1 parent 372e4f5 commit 13589b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions integreat_cms/cms/views/contacts/contact_form_ajax_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from ...decorators import permission_required
from ...forms import ContactForm
from ...models import Contact
from .contact_context_mixin import ContactContextMixin

if TYPE_CHECKING:
Expand Down Expand Up @@ -61,15 +60,12 @@ def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse:
:return: A status message, either a success or an error message
"""

contact_instance = Contact.objects.filter(id=None).first()

data = request.POST.dict()

contact_form = ContactForm(
data=data,
files=request.FILES,
instance=contact_instance,
instance=None,
additional_instance_attributes={
"region": request.region,
},
Expand Down

0 comments on commit 13589b7

Please sign in to comment.