Capture signals sent by admin proxy models.

This will prevent those weird missing UserProfile and AuthGroup errors.
Add logging to authentication signals.
Correct reverse migration authservicesinfo creation.
Rename proxy models so they look better on the admin site.
This commit is contained in:
Adarnof
2018-02-22 14:25:43 -05:00
parent 5060d3f408
commit 3ed0f873f3
7 changed files with 72 additions and 28 deletions

View File

@@ -145,7 +145,7 @@ def recreate_authservicesinfo(apps, schema_editor):
User = apps.get_model('auth', 'User')
# recreate all missing AuthServicesInfo models
AuthServicesInfo.objects.bulk_create([AuthServicesInfo(user=u.pk) for u in User.objects.all()])
AuthServicesInfo.objects.bulk_create([AuthServicesInfo(user_id=u.pk) for u in User.objects.all()])
# repopulate main characters
for profile in UserProfile.objects.exclude(main_character__isnull=True).select_related('user', 'main_character'):
@@ -233,7 +233,7 @@ class Migration(migrations.Migration):
),
migrations.RunPython(disable_passwords, migrations.RunPython.noop),
migrations.CreateModel(
name='ProxyPermission',
name='Permission',
fields=[
],
options={
@@ -247,7 +247,7 @@ class Migration(migrations.Migration):
],
),
migrations.CreateModel(
name='ProxyUser',
name='User',
fields=[
],
options={