Skip to content
Snippets Groups Projects
Commit 8fdb1d4d authored by magicfelix's avatar magicfelix
Browse files

Fix about page for unknown licences

parent bb5bd09f
No related branches found
No related tags found
1 merge request!1271Resolve "About page fails to load if app with unkown licence is installed"
Pipeline #133526 canceled
...@@ -87,6 +87,10 @@ class AppConfig(django.apps.AppConfig): ...@@ -87,6 +87,10 @@ class AppConfig(django.apps.AppConfig):
# Get string representation of licence in SPDX format # Get string representation of licence in SPDX format
licence = getattr(cls, "licence", None) licence = getattr(cls, "licence", None)
default_flags = {
"isFsfLibre": False,
"isOsiApproved": False,
}
default_dict = { default_dict = {
"isDeprecatedLicenseId": False, "isDeprecatedLicenseId": False,
"isFsfLibre": False, "isFsfLibre": False,
...@@ -131,7 +135,7 @@ class AppConfig(django.apps.AppConfig): ...@@ -131,7 +135,7 @@ class AppConfig(django.apps.AppConfig):
return (readable, flags, licence_dicts) return (readable, flags, licence_dicts)
else: else:
# We could not find a valid licence # We could not find a valid licence
return ("Unknown", [default_dict]) return ("Unknown", default_flags, [default_dict])
@classmethod @classmethod
def get_licence_dict(cls): def get_licence_dict(cls):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment