Skip to content

Commit

Permalink
Patch the second import of AggsProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
millerf committed Nov 24, 2024
1 parent 78c665c commit 276280e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@
>>>
>>> model = Publisher # The model associate with this Document
"""
from elasticsearch_dsl.search import AggsProxy
try: # code for 8.13 (requires 8.13.1)
# This should not be imported in external projects, as it is a internal tool.
# See https://github.com/barseghyanartur/django-elasticsearch-dsl-drf/pull/316/files#r1596499499
from elasticsearch_dsl.search_base import AggsProxy
except ImportError:
# backward-compatible (older than 8.13)
from elasticsearch_dsl.search import AggsProxy

from elasticsearch_dsl.search_base import AggsProxy

from django_elasticsearch_dsl_drf.constants import (
FUNCTIONAL_SUGGESTER_TERM_MATCH,
Expand Down

0 comments on commit 276280e

Please sign in to comment.