default safe mode for activity serialization

This commit is contained in:
Mouse Reeve 2021-02-23 17:19:47 -08:00
parent 4d0e52bf51
commit fba53c72e0
2 changed files with 2 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class ActivitypubResponse(JsonResponse):
configures some stuff beforehand. Made to be a drop-in replacement of
JsonResponse.
"""
def __init__(self, data, encoder=ActivityEncoder, safe=True,
def __init__(self, data, encoder=ActivityEncoder, safe=False,
json_dumps_params=None, **kwargs):
if 'content_type' not in kwargs:

View file

@ -1,6 +1,5 @@
''' tagging views'''
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotFound
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator
@ -20,7 +19,7 @@ class Tag(View):
if is_api_request(request):
return ActivitypubResponse(
tag_obj.to_activity(**request.GET), safe=False)
tag_obj.to_activity(**request.GET))
books = models.Edition.objects.filter(
usertag__tag__identifier=tag_id