Link preflight check

This commit is contained in:
Matthias 2021-09-19 16:52:31 +02:00
parent 3edabc810e
commit 063a0e5142
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -86,7 +86,12 @@ class NavigationMixin:
"""
setup navigation links for this plugin
"""
return getattr(self, 'NAVIGATION', None)
nav_links = getattr(self, 'NAVIGATION', None)
if nav_links:
for link in nav_links:
if False in [a in link for a in ('link', 'name', )]:
raise NotImplementedError('Wrong Link definition', link)
return nav_links
@property
def has_naviation(self):