Skip to content

Commit

Permalink
Support django-elasticsearch-dsl v6.4.2
Browse files Browse the repository at this point in the history
DocType was replaced with Document as top level import.
django-es/django-elasticsearch-dsl#185
  • Loading branch information
jayvdb committed Jan 1, 2021
1 parent f976da8 commit 7cf2c14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bluebottle/activities/documents.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from builtins import str
from builtins import object
from django_elasticsearch_dsl import DocType, fields

from bluebottle.initiatives.documents import DocType, fields

from bluebottle.utils.documents import MultiTenantIndex
from bluebottle.activities.models import Activity
Expand Down
7 changes: 6 additions & 1 deletion bluebottle/initiatives/documents.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from builtins import object
from django_elasticsearch_dsl import DocType, fields

try:
from django_elasticsearch_dsl.documents import DocType
except ImportError:
from django_elasticsearch_dsl import DocType
from django_elasticsearch_dsl import fields

from bluebottle.time_based.models import PeriodActivity, DateActivity
from bluebottle.utils.documents import MultiTenantIndex
Expand Down

0 comments on commit 7cf2c14

Please sign in to comment.