Prevent peewee from loading the visibility every time
By calling `visibility` instead of `visibility_id`, peewee was issuing a SQL Select statement for the repository, which removes the benefit of the optimization
This commit is contained in:
parent
7cb2da4cea
commit
eece782038
1 changed files with 1 additions and 1 deletions
|
@ -393,7 +393,7 @@ def lookup_repository(repo_id):
|
|||
|
||||
|
||||
def is_repository_public(repository):
|
||||
return repository.visibility == _basequery.get_public_repo_visibility()
|
||||
return repository.visibility_id == _basequery.get_public_repo_visibility().id
|
||||
|
||||
|
||||
def repository_is_public(namespace_name, repository_name):
|
||||
|
|
Reference in a new issue