Commit 15ffd318 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos-quota: allow syncing with --user

parent 4033d09f
......@@ -74,11 +74,7 @@ class Command(BaseCommand):
user_ident = options['user']
if user_ident is not None:
if verify:
raise CommandError("Cannot combine `--user' option "
"with `--verify' or `--sync'.")
log = self.run_sync_user(user_ident)
log = self.run_sync_user(user_ident, sync)
log =
......@@ -91,7 +87,7 @@ class Command(BaseCommand):
self.list_quotas(qh_l, qh_c, astakos_i, info)
def run_sync_user(self, user_ident):
def run_sync_user(self, user_ident, sync):
if is_uuid(user_ident):
user = AstakosUser.objects.get(uuid=user_ident)
......@@ -107,8 +103,11 @@ class Command(BaseCommand):
raise CommandError('Please specify user by uuid or email')
if not user.email_verified and sync:
raise CommandError('User %s is not verified.' % user.uuid)
return sync_users([user], sync=False)
return sync_users([user], sync=sync)
except BaseException, e:
raise CommandError("Failed to compute quotas.")
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