diff --git a/combo/apps/dataviz/utils.py b/combo/apps/dataviz/utils.py index ff98a623..e3bacb8b 100644 --- a/combo/apps/dataviz/utils.py +++ b/combo/apps/dataviz/utils.py @@ -1,6 +1,5 @@ import json -import django from django.conf import settings from combo.utils import requests @@ -73,13 +72,7 @@ def update_available_statistics(): statistics_to_create.append(stat) Statistic.objects.bulk_create(statistics_to_create) - if django.VERSION < (2, 2, 0): - for statistic in statistics_to_update.values(): - Statistic.objects.filter(pk=statistic.pk).update( - **{field: getattr(statistic, field) for field in update_fields} - ) - else: - Statistic.objects.bulk_update(statistics_to_update.values(), update_fields) + Statistic.objects.bulk_update(statistics_to_update.values(), update_fields) available_stats = Statistic.objects.filter(available=True) for stat in results: diff --git a/combo/urls_utils.py b/combo/urls_utils.py index 3033f5ab..1314d708 100644 --- a/combo/urls_utils.py +++ b/combo/urls_utils.py @@ -16,16 +16,10 @@ # Decorating URL includes, -import django from django.contrib.auth.decorators import user_passes_test from django.core.exceptions import PermissionDenied from django.db.models import Q - -if django.VERSION < (2, 0, 0): - from django.urls.resolvers import RegexURLPattern as URLPattern # pylint: disable=no-name-in-module - from django.urls.resolvers import RegexURLResolver as URLResolver # pylint: disable=no-name-in-module -else: - from django.urls.resolvers import URLPattern, URLResolver +from django.urls.resolvers import URLPattern, URLResolver class DecoratedURLPattern(URLPattern):