From db267f32c158f4311c017ad3febe049a680ed5c0 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Mon, 5 Mar 2018 19:24:49 +0530 Subject: Add an else statement instead of continue keyword --- yaksh/management/commands/add_moderator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yaksh') diff --git a/yaksh/management/commands/add_moderator.py b/yaksh/management/commands/add_moderator.py index 461c03f..5e63285 100644 --- a/yaksh/management/commands/add_moderator.py +++ b/yaksh/management/commands/add_moderator.py @@ -32,6 +32,6 @@ class Command(BaseCommand): raise CommandError('User "{0}" does not exist'.format(uname)) if user in group.user_set.all(): self.stdout.write('User "{0}" is already a Moderator'.format(uname)) - continue - group.user_set.add(user) - self.stdout.write('Successfully added User "{0}" to Moderator group'.format(uname)) + else: + group.user_set.add(user) + self.stdout.write('Successfully added User "{0}" to Moderator group'.format(uname)) -- cgit