Mark the community auth login history field as not required in admin
authorMagnus Hagander <magnus@hagander.net>
Sat, 8 Aug 2020 15:01:15 +0000 (17:01 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sat, 8 Aug 2020 15:09:59 +0000 (17:09 +0200)
With this field marked required and containing only static data and
nothing to edit, it was impossible to save the user editor at all.

pgweb/account/admin.py

index 809961b366df17efde005e04e11caa44dfed4c72..6221bf9f720795e633c25fe068950f7d4544d11c 100644 (file)
@@ -34,7 +34,7 @@ class CommunityAuthSiteAdmin(admin.ModelAdmin):
 
 
 class PGUserChangeForm(UserChangeForm):
-    logininfo = forms.CharField(label="Community login history")
+    logininfo = forms.CharField(label="Community login history", required=False)
 
     def __init__(self, *args, **kwargs):
         super(PGUserChangeForm, self).__init__(*args, **kwargs)