fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quickfix
[wolnelektury.git]
/
src
/
wolnelektury
/
management
/
commands
/
clean_social_accounts.py
diff --git
a/src/wolnelektury/management/commands/clean_social_accounts.py
b/src/wolnelektury/management/commands/clean_social_accounts.py
index
263ee2c
..
5b1a37b
100644
(file)
--- a/
src/wolnelektury/management/commands/clean_social_accounts.py
+++ b/
src/wolnelektury/management/commands/clean_social_accounts.py
@@
-1,6
+1,5
@@
-# -*- coding: utf-8 -*-
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
#
from allauth.socialaccount.models import SocialAccount
from django.core.management.base import BaseCommand
@@
-14,8
+13,8
@@
KEPT_FIELDS = {
class Command(BaseCommand):
def handle(self, *args, **options):
class Command(BaseCommand):
def handle(self, *args, **options):
- for provider, kept_fields in KEPT_FIELDS.ite
rite
ms():
+ for provider, kept_fields in KEPT_FIELDS.items():
for sa in SocialAccount.objects.filter(provider=provider):
for sa in SocialAccount.objects.filter(provider=provider):
- trimmed_data = {k: v for k, v in sa.extra_data.ite
rite
ms() if k in kept_fields}
+ trimmed_data = {k: v for k, v in sa.extra_data.items() if k in kept_fields}
sa.extra_data = trimmed_data
sa.save()
sa.extra_data = trimmed_data
sa.save()