Remove extra update call on create repo
This commit is contained in:
parent
db0b28eadb
commit
1e1bec0afe
2 changed files with 4 additions and 4 deletions
|
@ -33,11 +33,12 @@ def get_public_repo_visibility():
|
|||
return _basequery.get_public_repo_visibility()
|
||||
|
||||
|
||||
def create_repository(namespace, name, creating_user, visibility='private', repo_kind='image'):
|
||||
def create_repository(namespace, name, creating_user, visibility='private', repo_kind='image',
|
||||
description=None):
|
||||
private = Visibility.get(name=visibility)
|
||||
namespace_user = User.get(username=namespace)
|
||||
repo = Repository.create(name=name, visibility=private, namespace_user=namespace_user,
|
||||
kind=Repository.kind.get_id(repo_kind))
|
||||
kind=Repository.kind.get_id(repo_kind), description=description)
|
||||
admin = Role.get(name='admin')
|
||||
|
||||
yesterday = datetime.now() - timedelta(days=1)
|
||||
|
|
|
@ -126,8 +126,7 @@ class PreOCIModel(RepositoryDataInterface):
|
|||
def create_repo(self, namespace_name, repository_name, owner, description, visibility='private',
|
||||
repo_kind='image'):
|
||||
repo = model.repository.create_repository(namespace_name, repository_name, owner, visibility,
|
||||
repo_kind=repo_kind)
|
||||
model.repository.set_description(repo, description)
|
||||
repo_kind=repo_kind, description=description)
|
||||
return Repository(namespace_name, repository_name)
|
||||
|
||||
def get_repo(self, namespace_name, repository_name, user):
|
||||
|
|
Reference in a new issue