Replace Router.get_default_base_name by Router.get_default_basename

Deprecated in DRF 3.9.0
This commit is contained in:
Santiago L 2021-06-08 13:34:36 +02:00
parent 81c67778e5
commit 70f7551e7d

View file

@ -68,7 +68,7 @@ class LinkHeaderRouter(DefaultRouter):
def register(self, prefix, viewset, base_name=None):
""" inserts link headers on every viewset """
if base_name is None:
base_name = self.get_default_base_name(viewset)
base_name = self.get_default_basename(viewset)
insert_links(viewset, base_name)
self.registry.append((prefix, viewset, base_name))