Merge pull request #1124 from jzelinskie/fixusage
only check repo usage when billing enabled
This commit is contained in:
commit
8543cfffec
1 changed files with 3 additions and 2 deletions
|
@ -331,8 +331,9 @@ class Repository(RepositoryParamResource):
|
||||||
""" Delete a repository. """
|
""" Delete a repository. """
|
||||||
model.repository.purge_repository(namespace, repository)
|
model.repository.purge_repository(namespace, repository)
|
||||||
user = model.user.get_namespace_user(namespace)
|
user = model.user.get_namespace_user(namespace)
|
||||||
plan = get_namespace_plan(namespace)
|
if features.BILLING:
|
||||||
check_repository_usage(user, plan)
|
plan = get_namespace_plan(namespace)
|
||||||
|
check_repository_usage(user, plan)
|
||||||
log_action('delete_repo', namespace,
|
log_action('delete_repo', namespace,
|
||||||
{'repo': repository, 'namespace': namespace})
|
{'repo': repository, 'namespace': namespace})
|
||||||
return 'Deleted', 204
|
return 'Deleted', 204
|
||||||
|
|
Reference in a new issue