app settings: rename the get user queryset func setting name.

This commit is contained in:
Tom Hacohen 2020-07-13 16:08:46 +03:00
parent 46b4f08afa
commit e41f8455f2
2 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,8 @@ class AppSettings:
return ret
@cached_property
def GET_USER_QUERYSET(self): # pylint: disable=invalid-name
get_user_queryset = self._setting("GET_USER_QUERYSET", None)
def GET_USER_QUERYSET_FUNC(self): # pylint: disable=invalid-name
get_user_queryset = self._setting("GET_USER_QUERYSET_FUNC", None)
if get_user_queryset is not None:
return self.import_from_str(get_user_queryset)
return None

View File

@ -6,7 +6,7 @@ User = get_user_model()
def get_user_queryset(queryset, view):
custom_func = app_settings.GET_USER_QUERYSET
custom_func = app_settings.GET_USER_QUERYSET_FUNC
if custom_func is not None:
return custom_func(queryset, view)
return queryset