diff --git a/for_runners/admin/gpx.py b/for_runners/admin/gpx.py index a87653c..5a8de0a 100644 --- a/for_runners/admin/gpx.py +++ b/for_runners/admin/gpx.py @@ -13,7 +13,7 @@ from django.conf.urls import url from django.contrib import admin, messages from django.contrib.admin.views.main import ChangeList -from django.db import IntegrityError, models +from django.db import IntegrityError, models, NotSupportedError from django.db.models import Avg, Max, Min from django.http import HttpResponseRedirect from django.template.loader import render_to_string @@ -457,7 +457,7 @@ def __init__(self, *args, **kwargs): try: user_count = qs.distinct("tracked_by").count() - except NotImplementedError: + except (NotImplementedError, NotSupportedError): # e.g.: sqlite has no distinct :( qs = qs.values_list("tracked_by__id", flat=True) user_count = len(set(qs))