Remove None fallback in get

This commit is contained in:
Edgar P. Burkhart 2023-04-20 15:51:26 +02:00
parent d595d73417
commit 442b36055a
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -71,7 +71,7 @@ class UserMixin(LoginRequiredMixin):
class NummiCreateView(UserMixin, CreateView): class NummiCreateView(UserMixin, CreateView):
def form_valid(self, form): def form_valid(self, form):
form.instance.user = self.request.user form.instance.user = self.request.user
self.next = form.data.get("next", None) self.next = form.data.get("next")
return super().form_valid(form) return super().form_valid(form)
def get_success_url(self): def get_success_url(self):