Test tag and list add
This commit is contained in:
@ -16,12 +16,11 @@ class Tag(View):
|
||||
''' tag page '''
|
||||
def get(self, request, tag_id):
|
||||
''' see books related to a tag '''
|
||||
tag_obj = models.Tag.objects.filter(identifier=tag_id).first()
|
||||
if not tag_obj:
|
||||
return HttpResponseNotFound()
|
||||
tag_obj = get_object_or_404(models.Tag, identifier=tag_id)
|
||||
|
||||
if is_api_request(request):
|
||||
return ActivitypubResponse(tag_obj.to_activity(**request.GET))
|
||||
return ActivitypubResponse(
|
||||
tag_obj.to_activity(**request.GET), safe=False)
|
||||
|
||||
books = models.Edition.objects.filter(
|
||||
usertag__tag__identifier=tag_id
|
||||
|
Reference in New Issue
Block a user