Skip to content

Commit

Permalink
fix to enable using UUIDs/non-default PKs
Browse files Browse the repository at this point in the history
PetrDlouhy committed Oct 1, 2021
1 parent 11b7613 commit 96c79f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_comments_xtd/api/frontend.py
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ def _reverse(*args, **kwargs):
form = CommentSecurityForm(obj)
ctype = ContentType.objects.get_for_model(obj)
queryset = XtdComment.objects.filter(content_type=ctype,
object_pk=obj.pk,
object_pk=obj._get_pk_val(),
site__pk=get_current_site_id(request),
is_public=True)
ctype_slug = "%s-%s" % (ctype.app_label, ctype.model)
@@ -86,10 +86,10 @@ def _reverse(*args, **kwargs):
"flag_url": _reverse("comments-flag", args=(0,)),
"list_url": _reverse('comments-xtd-api-list',
kwargs={'content_type': ctype_slug,
'object_pk': obj.id}),
'object_pk': obj._get_pk_val()}),
"count_url": _reverse('comments-xtd-api-count',
kwargs={'content_type': ctype_slug,
'object_pk': obj.id}),
'object_pk': obj._get_pk_val()}),
"send_url": _reverse("comments-xtd-api-create"),
"preview_url": _reverse("comments-xtd-api-preview"),
"form": {

0 comments on commit 96c79f5

Please sign in to comment.