From 0cbfbc27d838730f8238b3fd2d973369ca81d379 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 7 Aug 2015 15:41:46 +0100 Subject: [PATCH] Tweak erronous assignment --- rest_framework/relations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 874406696..330d17c08 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -219,7 +219,7 @@ class HyperlinkedRelatedField(RelatedField): def __init__(self, view_name=None, **kwargs): if view_name is not None: - view_name = self.view_name = view_name + self.view_name = view_name assert self.view_name is not None, 'The `view_name` argument is required.' self.lookup_field = kwargs.pop('lookup_field', self.lookup_field) self.lookup_url_kwarg = kwargs.pop('lookup_url_kwarg', self.lookup_field)