silverbackhq / silverback

🧬 A Status and Incident Communication Tool (Beta Version).
Apache License 2.0
45 stars 5 forks source link

Fix issue with missing google_account variable #71

Closed Clivern closed 5 years ago

Clivern commented 5 years ago
DEBUG 2019-04-20 21:19:51,557 Exception while resolving variable 'google_account' in template 'templates/status_page_index.html'.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/template/base.py", line 829, in _resolve_lookup
    current = current[bit]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/template/context.py", line 83, in __getitem__
    raise KeyError(key)
KeyError: 'google_account'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/template/base.py", line 835, in _resolve_lookup
    if isinstance(current, BaseContext) and getattr(type(current), bit):
AttributeError: type object 'RequestContext' has no attribute 'google_account'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/template/base.py", line 843, in _resolve_lookup
    current = current[int(bit)]
ValueError: invalid literal for int() with base 10: 'google_account'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/template/base.py", line 850, in _resolve_lookup
    (bit, current))  # missing attribute
django.template.base.VariableDoesNotExist: Failed lookup for key [google_account] in [{'True': True, 'False': False, 'None': None}, {'csrf_token': <SimpleLazyObject: <function csrf.<locals>._get_val at 0x10f925c80>>, 'request': <WSGIRequest: GET '/'>, 'user': <SimpleLazyObject: <User: admin>>, 'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x10f9722b0>, 'messages': <django.contrib.messages.storage.fallback.FallbackStorage object at 0x10f8dfcc0>, 'DEFAULT_MESSAGE_LEVELS': {'DEBUG': 10, 'INFO': 20, 'SUCCESS': 25, 'WARNING': 30, 'ERROR': 40}}, {}, {'AUTHOR': 'Clivern', 'COPYRIGHT': 'Copyright 2018, Clivern', 'LICENSE': 'Apache Version 2.0', 'VERSION': '1.0.0', 'MAINTAINER': 'A. F', 'EMAIL': 'hello@clivern.com', 'STATUS': 'basic', 'REPO_URL': 'https://github.com/Clivern/Silverback', 'AUTHOR_URL': 'http://clivern.com', 'RELEASES': 'https://api.github.com/repos/Clivern/Silverback/releases', 'SUPPORT_URL': 'https://github.com/Clivern/Silverback/issues', 'app_installed': 'true', 'google_analytics_account': '', 'app_name': 'Silverback', 'app_email': 'hello@silverback.com', 'app_url': 'http://127.0.0.1:8000/', 'page_title': 'Silverback', 'is_authenticated': True, 'system_status': 'operational', 'about_site': '', 'logo_url': 'http://clivern.com/wp-content/uploads/2019/04/clivern_logo-300x300.png', 'favicon_url': 'http://clivern.com/wp-content/uploads/2019/04/clivern_logo-300x300.png', 'past_incidents': [{'date': 'April 20, 2019', 'incidents': []}, {'date': 'April 19, 2019', 'incidents': []}, {'date': 'April 18, 2019', 'incidents': []}, {'date': 'April 17, 2019', 'incidents': []}, {'date': 'April 16, 2019', 'incidents': []}, {'date': 'April 15, 2019', 'incidents': []}, {'date': 'April 14, 2019', 'incidents': []}], 'system_metrics': [{'id': 'container', 'title': 'Website Dashboard - Average response time', 'xtitle': 'Date', 'ytitle': 'Time (m)', 'day_data': [{'timestamp': 1554858060000, 'value': 0.7}, {'timestamp': 1554858120000, 'value': 0.8}, {'timestamp': 1554858180000, 'value': 0.9}, {'timestamp': 1554858240000, 'value': 0.95}], 'week_data': [{'timestamp': 1554858060000, 'value': 0.75}, {'timestamp': 1554858120000, 'value': 0.85}, {'timestamp': 1554858180000, 'value': 0.95}, {'timestamp': 1554858240000, 'value': 0.98}], 'month_data': [{'timestamp': 1554858060000, 'value': 0.95}, {'timestamp': 1554858120000, 'value': 0.76}, {'timestamp': 1554858180000, 'value': 0.43}, {'timestamp': 1554858240000, 'value': 0.78}]}], 'services': []}, {}]
Clivern commented 5 years ago

Fixed