From f60114c0a7c83216789eefea067c3b4522e085a0 Mon Sep 17 00:00:00 2001 From: sol HYUN Date: Thu, 23 Mar 2017 17:48:01 +0900 Subject: [PATCH] Change get_links method code --- rest_framework/schemas.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index b2cfe4d77..b6ce371b6 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -322,13 +322,12 @@ class SchemaGenerator(object): # Only generate the path prefix for paths that will be included if not paths: return None - prefix = self.determine_path_prefix(paths) for path, method, view in view_endpoints: if not self.has_view_permissions(path, method, view): continue link = self.get_link(path, method, view) - subpath = path[len(prefix):] + typical_path = self.make_typical_path(path) keys = self.get_keys(subpath, method, view) insert_into(links, keys, link) return links