You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think .all() is required in the following two methods:
defget_categories(self: "CategoryManager") ->models.QuerySet:
"""Return the queryset for categories. If CACHE_CATEGORIES is set to True, we return the cached queryset. """ifdjpress_settings.CACHE_CATEGORIES:
returnself._get_cached_categories()
returnself.all()
def_get_cached_categories(self: "CategoryManager") ->models.QuerySet:
"""Return the cached categories queryset."""queryset=cache.get(CATEGORY_CACHE_KEY)
ifquerysetisNone:
queryset=self.all()
cache.set(CATEGORY_CACHE_KEY, queryset, timeout=None)
returnqueryset
The text was updated successfully, but these errors were encountered:
I don't think
.all()
is required in the following two methods:The text was updated successfully, but these errors were encountered: