misc: silence pylint warning (#72942)
@logit def head(self, request, partner_name, cut_uuid, petal_name): -> pylint: An attribute defined in django.views.generic.base line 85 hides this method It comes from some conditional code in the base View class: class View: ... def setup(self, request, *args, **kwargs): """Initialize attributes shared by all view methods.""" if hasattr(self, 'get') and not hasattr(self, 'head'): self.head = self.get
This commit is contained in:
parent
972ce33d5d
commit
fe2b44ab29
|
@ -178,7 +178,7 @@ class PetalAPIView(APIView):
|
|||
return petal
|
||||
|
||||
@logit
|
||||
def head(self, request, partner_name, cut_uuid, petal_name):
|
||||
def head(self, request, partner_name, cut_uuid, petal_name): # pylint: disable=method-hidden
|
||||
petal = self.get_petal(partner_name, cut_uuid, petal_name)
|
||||
response = HttpResponse(content_type=petal.content_type)
|
||||
response['Content-Length'] = petal.size
|
||||
|
|
Loading…
Reference in New Issue