Commits

Chris Beaven committed 79f9d82

Fix the form instanciation when no POST given (form_data should have been None)

Comments (0)

Files changed (1)

lockdown/middleware.py

             if pattern.search(request.path):
                 return None
 
-        form_data = request.method == 'POST' and request.POST
+        form_data = request.method == 'POST' and request.POST or None
         form = _lockdown_form(data=form_data)
 
         # Don't lock down if the user is already authorized for previewing.