You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code responsible for returning a rendered response lacks support for properly returning GET requests originating via ajax. In django-forms-builder/forms_builder/forms/views.py, line 66 triggers on both GET and POST ajax, but lines 68 and 69 rely on the post() call to have set context["form_for_form"] already. Attempting to GET the form view via ajax presently results in a 500 server error, resulting from the KeyError created by the absence of a defined form_for_form property.
Note, the simple addition of and not self.request.method == "GET" to the if statement will solve this and cause only non-GET ajax requests to enter the conditional code while causing all GET requests to return uniform results.
The text was updated successfully, but these errors were encountered:
The code responsible for returning a rendered response lacks support for properly returning GET requests originating via ajax. In django-forms-builder/forms_builder/forms/views.py, line 66 triggers on both GET and POST ajax, but lines 68 and 69 rely on the
post()
call to have setcontext["form_for_form"]
already. Attempting to GET the form view via ajax presently results in a 500 server error, resulting from the KeyError created by the absence of a definedform_for_form
property.Note, the simple addition of
and not self.request.method == "GET"
to the if statement will solve this and cause only non-GET ajax requests to enter the conditional code while causing all GET requests to return uniform results.The text was updated successfully, but these errors were encountered: