Commit 0802baea authored by Michal Čihař's avatar Michal Čihař

Compatibility with recent Django

parent 6f8449ee
......@@ -37,6 +37,8 @@ class Command(BaseCommand):
data = json.load(open(args[0]))
for line in data:
if 'fields' in line:
line = line['fields']
if User.objects.filter(username=line['username']).exists():
print('Skipping {}, username exists'.format(line['username']))
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment