diff --git a/oscar_elasticsearch/search/facets.py b/oscar_elasticsearch/search/facets.py index 8801a68..eb35e7c 100644 --- a/oscar_elasticsearch/search/facets.py +++ b/oscar_elasticsearch/search/facets.py @@ -136,6 +136,10 @@ def __init__(self, facet, key, doc_count, request_url, selected, formatter=None) def name(self): return self.key + @property + def count(self): + return self.doc_count + def __str__(self): if self.formatter is not None: return f"{self.formatter(self.key)!s}" diff --git a/setup.py b/setup.py index 35a12cb..a1d1e55 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ install_requires=[ "django>=3.2", "setuptools", - "django-oscar>=3.2.5", + "django-oscar>=4.0a1", "purl", "elasticsearch>=8.0.0", "uwsgidecorators-fallback",