From 55e4885defe4f781e52329be25b98d4029591ed9 Mon Sep 17 00:00:00 2001 From: Ian Clark Date: Wed, 11 Jan 2017 08:21:28 +0000 Subject: [PATCH] Don't overwrite builtin --- rest_framework_serializer_extensions/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework_serializer_extensions/fields.py b/rest_framework_serializer_extensions/fields.py index a9f41a9..4c7988b 100644 --- a/rest_framework_serializer_extensions/fields.py +++ b/rest_framework_serializer_extensions/fields.py @@ -71,7 +71,7 @@ def to_internal_value(self, value): class HashedHyperlinkMixin(GetHashIdModelMixin): - def get_url(self, obj, view_name, request, format): + def get_url(self, obj, view_name, request, fmt): """ Use the field source in combination with the model to generate the URL. """ @@ -85,7 +85,7 @@ def get_url(self, obj, view_name, request, format): ) kwargs = {self.lookup_url_kwarg: external_id} return self.reverse( - view_name, kwargs=kwargs, request=request, format=format + view_name, kwargs=kwargs, request=request, format=fmt )