summaryrefslogtreecommitdiff
path: root/app/lib/django_comments/managers.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-05-14 20:29:38 -0400
committerlxf <sng@luxagraf.net>2022-05-14 20:29:38 -0400
commit01e4bdad76b91b34e6f6744a28764eb1c74120de (patch)
tree5a5fd3059bb6ed5bef574257bdb7d766559b7aaf /app/lib/django_comments/managers.py
parentbb3973ffb714c932e9ec6dd6a751228dc71fe1d3 (diff)
updated to support django 4.0
Diffstat (limited to 'app/lib/django_comments/managers.py')
-rw-r--r--app/lib/django_comments/managers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/django_comments/managers.py b/app/lib/django_comments/managers.py
index 9e1fc77..33d9e2a 100644
--- a/app/lib/django_comments/managers.py
+++ b/app/lib/django_comments/managers.py
@@ -1,6 +1,6 @@
from django.db import models
from django.contrib.contenttypes.models import ContentType
-from django.utils.encoding import force_text
+from django.utils.encoding import force_str
class CommentManager(models.Manager):
@@ -18,5 +18,5 @@ class CommentManager(models.Manager):
ct = ContentType.objects.get_for_model(model)
qs = self.get_queryset().filter(content_type=ct)
if isinstance(model, models.Model):
- qs = qs.filter(object_pk=force_text(model._get_pk_val()))
+ qs = qs.filter(object_pk=force_str(model._get_pk_val()))
return qs