From 22e25ac454b52686685d4d9f1241416cd35fafda Mon Sep 17 00:00:00 2001 From: Paolo Melchiorre Date: Mon, 5 Dec 2022 22:44:50 +0100 Subject: Add django-upgrade to pre-commit (#114) --- activities/views/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activities') diff --git a/activities/views/posts.py b/activities/views/posts.py index 60873a7..65b324a 100644 --- a/activities/views/posts.py +++ b/activities/views/posts.py @@ -21,7 +21,7 @@ class Individual(TemplateView): self.identity = by_handle_or_404(self.request, handle, local=False) self.post_obj = get_object_or_404(self.identity.posts, pk=post_id) # If they're coming in looking for JSON, they want the actor - accept = request.META.get("HTTP_ACCEPT", "text/html").lower() + accept = request.headers.get("accept", "text/html").lower() if ( "application/json" in accept or "application/ld" in accept -- cgit v1.2.3