parent
8e7b20a0d7
commit
147b7b26b4
2 changed files with 3 additions and 2 deletions
|
@ -235,7 +235,8 @@ def get_visible_repositories(username, namespace=None, page=None, limit=None, in
|
|||
return []
|
||||
|
||||
query = (Repository
|
||||
.select(Repository.name, Repository.id, Repository.description, Namespace.username)
|
||||
.select(Repository.name, Repository.id, Repository.description, Namespace.username,
|
||||
Repository.visibility)
|
||||
.distinct()
|
||||
.switch(Repository)
|
||||
.join(Namespace, on=(Repository.namespace_user == Namespace.id))
|
||||
|
|
|
@ -203,7 +203,7 @@ class RepositoryList(ApiResource):
|
|||
'namespace': repo_obj.namespace_user.username,
|
||||
'name': repo_obj.name,
|
||||
'description': repo_obj.description,
|
||||
'is_public': repo_obj.visibility_id == model.repository.get_public_repo_visibility(),
|
||||
'is_public': repo_obj.visibility_id == model.repository.get_public_repo_visibility().id,
|
||||
}
|
||||
|
||||
repo_id = repo_obj.id
|
||||
|
|
Reference in a new issue