Skip to content

Commit

Permalink
Minor cleanup of __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed May 7, 2024
1 parent 00df2fa commit d1c4fe1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions openatlas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
from openatlas.models.logger import Logger
from openatlas.api import api
from openatlas.views import (
admin, ajax, annotation, arche, tools, changelog, entity, entity_index,
error, export, file, hierarchy, index, imports, link, login, model, note,
overlay, profile, search, sql, type as type_, user, vocabs)
admin, ajax, annotation, arche, changelog, entity, entity_index, error,
export, file, hierarchy, index, imports, link, login, model, note, overlay,
profile, search, sql, tools, type as type_, user, vocabs)


@babel.localeselector
Expand Down Expand Up @@ -64,9 +64,7 @@ def before_request() -> None:
g.properties = CidocProperty.get_all(session['language'])
g.classes = OpenatlasClass.get_all()
with_count = False
if (request.path.startswith('/type')
or request.path.startswith('/api/type_tree/')
or request.path.startswith('/admin/orphans')
if (request.path.startswith(('/type', '/api/type_tree/', '/admin/orphans'))
or (request.path.startswith('/entity/') and
request.path.split('/entity/')[1].isdigit())):
with_count = True
Expand Down

0 comments on commit d1c4fe1

Please sign in to comment.