From 6d38a4190fcae07a419605016de92a5faf311179 Mon Sep 17 00:00:00 2001 From: nathaniel smith Date: Mon, 16 Jan 2017 22:10:55 -0800 Subject: [PATCH] handle default displayname --- ttadmin/users/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ttadmin/users/views.py b/ttadmin/users/views.py index 49aa79a..4f4b5f4 100644 --- a/ttadmin/users/views.py +++ b/ttadmin/users/views.py @@ -23,6 +23,8 @@ class SignupView(FormView): key_type=form.cleaned_data.pop('pubkey_type')) t = Townie(**form.cleaned_data) + if not getattr(t, 'displayname'): + t.displayname = t.username t.set_unusable_password() t.save() pubkey.townie = t