diff --git a/dash/utils.py b/dash/utils.py index 99d45d0..f54a96a 100644 --- a/dash/utils.py +++ b/dash/utils.py @@ -65,7 +65,14 @@ source_code = None def footer_ctx(): global source_code if source_code is None: - source_code = {"text": "Source Code", "link": settings.HOSTEA["SOURCE_CODE"]} + if "SOURCE_CODE" in settings.HOSTEA: + source_code = { + "text": "Source Code", + "link": settings.HOSTEA["SOURCE_CODE"], + } + else: + link = "https://gitea.hostea.org/Hostea/dashboard" + source_code = {"text": "Source Code", "link": link} try: r = Repo(".") commit = r.head.commit.hexsha