Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
e485a662
Commit
e485a662
authored
Apr 29, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 500 error on 404 page
parent
13f41449
Pipeline
#67
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
uitwww/navbar.py
uitwww/navbar.py
+8
-7
No files found.
uitwww/navbar.py
View file @
e485a662
...
...
@@ -33,14 +33,15 @@ class Navbar:
def
current_navbars
(
self
):
"""Get the list of current navbars"""
matcher
=
(
flask
.
request
.
endpoint
,
tuple
(
flask
.
request
.
view_args
.
items
()))
if
flask
.
request
.
endpoint
is
not
None
:
matcher
=
(
flask
.
request
.
endpoint
,
tuple
(
flask
.
request
.
view_args
.
items
()))
if
matcher
in
self
.
match
:
return
self
.
_return_navbars
(
self
.
match
[
matcher
])
elif
flask
.
request
.
endpoint
in
self
.
match
:
return
self
.
_return_navbars
(
self
.
match
[
flask
.
request
.
endpoint
])
else
:
return
self
.
_return_navbars
([(
0
,
-
1
)])
if
matcher
in
self
.
match
:
return
self
.
_return_navbars
(
self
.
match
[
matcher
])
elif
flask
.
request
.
endpoint
in
self
.
match
:
return
self
.
_return_navbars
(
self
.
match
[
flask
.
request
.
endpoint
])
return
self
.
_return_navbars
([(
0
,
-
1
)])
def
_return_navbars
(
self
,
navbars
):
"""Return a list of navbars"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment