Remove repeated dictionary key 'matomo_site_id' from ui_common.py
Opened this issue · 0 comments
jsjiang commented
Flake8 reported F601 dictionary key 'matomo_site_id' repeated with different values
in two places in ui_common.py
. If thematomo_site_id
key is used by the Matomo API tracking, it will be removed when we clean up related code. If it is used by the UI, then remove the duplicated configuration.
def render(request, template, context={}):
ctx = {
"session": request.session,
"authenticatedUser": impl.userauth.getUser(request),
# Todo: Reimplement alertMessage without ServerVariables
"alertMessage": None,
"feed_cache": [], # ezidapp.management.commands.newsfeed.getLatestItems(),
"matomo_site_id": django.conf.settings.MATOMO_SITE_ID,
"debug": django.conf.settings.DEBUG,
"matomo_site_url": django.conf.settings.MATOMO_SITE_URL,
"matomo_site_id": django.conf.settings.MATOMO_SITE_ID,
}
def error(request, code, content_custom=None):
ctx = {
"menu_item": "ui_home.null",
"session": request.session,
# Todo: Reimplement alertMessage without ServerVariables
"alertMessage": None,
"feed_cache": [], # ezidapp.management.commands.newsfeed.getLatestItems(),
"matomo_site_id": django.conf.settings.MATOMO_SITE_ID,
"content_custom": content_custom,
"matomo_site_url": django.conf.settings.MATOMO_SITE_URL,
"matomo_site_id": django.conf.settings.MATOMO_SITE_ID,
}