|
@@ -818,7 +818,7 @@ class QuerySet:
|
|
|
# PUBLIC METHODS THAT RETURN A QUERYSET SUBCLASS #
|
|
|
##################################################
|
|
|
|
|
|
- def raw(self, raw_query, params=None, translations=None, using=None):
|
|
|
+ def raw(self, raw_query, params=(), translations=None, using=None):
|
|
|
if using is None:
|
|
|
using = self.db
|
|
|
qs = RawQuerySet(raw_query, model=self.model, params=params, translations=translations, using=using)
|
|
@@ -1419,14 +1419,14 @@ class RawQuerySet:
|
|
|
Provide an iterator which converts the results of raw SQL queries into
|
|
|
annotated model instances.
|
|
|
"""
|
|
|
- def __init__(self, raw_query, model=None, query=None, params=None,
|
|
|
+ def __init__(self, raw_query, model=None, query=None, params=(),
|
|
|
translations=None, using=None, hints=None):
|
|
|
self.raw_query = raw_query
|
|
|
self.model = model
|
|
|
self._db = using
|
|
|
self._hints = hints or {}
|
|
|
self.query = query or sql.RawQuery(sql=raw_query, using=self.db, params=params)
|
|
|
- self.params = params or ()
|
|
|
+ self.params = params
|
|
|
self.translations = translations or {}
|
|
|
self._result_cache = None
|
|
|
self._prefetch_related_lookups = ()
|