From bed56b253e3096aa2ff0c0c06e30d5991de39e1e Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Sun, 24 Dec 2017 19:44:56 +0000 Subject: [PATCH] mypy: Add clarifying variable in add_new_user.py. --- zilencer/management/commands/add_new_user.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zilencer/management/commands/add_new_user.py b/zilencer/management/commands/add_new_user.py index d4d1d0deaa..b98c9047b7 100644 --- a/zilencer/management/commands/add_new_user.py +++ b/zilencer/management/commands/add_new_user.py @@ -22,10 +22,11 @@ and will otherwise fall back to the zulip realm.""" if realm is None: print('Warning: Using default zulip realm, which has an unusual configuration.\n' 'Try running `python manage.py add_new_realm`, and then running this again.') - realm = Realm.objects.get(string_id='zulip') + valid_realm = Realm.objects.get(string_id='zulip') domain = 'zulip.com' else: + valid_realm = realm domain = realm.string_id + '.zulip.com' name = '%02d-user' % (UserProfile.objects.filter(email__contains='user@').count(),) - do_create_user('%s@%s' % (name, domain), 'password', realm, name, name) + do_create_user('%s@%s' % (name, domain), 'password', valid_realm, name, name)