Skip to content

Commit

Permalink
fix: import ContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
filipweidemann committed Jul 30, 2024
1 parent fd4ddf3 commit fb82edc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions djangocms_haystack/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from cms.models import CMSPlugin, Placeholder
from django.contrib.contenttypes.models import ContentType
from django.conf import settings
from django.core.handlers.wsgi import WSGIRequest
from django.db import models
Expand Down Expand Up @@ -92,8 +93,8 @@ def get_placeholders(
) -> models.QuerySet[Placeholder]:
content_type = ContentType.objects.get_for_model(instance)
return Placeholder.objects.filter(
object_id=instance.pk, content_type=content_type
)
object_id=instance.pk, content_type=content_type
)

def get_search_data(
self, instance: models.Model, language: str, request: WSGIRequest
Expand Down

0 comments on commit fb82edc

Please sign in to comment.