#31110 closed Cleanup/optimization (fixed)
Typo in docs/ref/models/expressions.txt.
Reported by: | Hongtao Ma | Owned by: | Hongtao Ma |
---|---|---|---|
Component: | Documentation | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
in models/expresions section of the doc,
the code snippet:
def as_sql(self, compiler, connection, template=None): sql_expressions, sql_params = [], [] for expression in self.expressions: sql, params = compiler.compile(expression) sql_expressions.append(sql) sql_params.extend(params) template = template or self.template data = {'expressions': ','.join(sql_expressions)} return template % data, params
should return sql_params instead of params
Change History (4)
comment:1 by , 5 years ago
Owner: | changed from | to
---|
comment:2 by , 5 years ago
Has patch: | set |
---|---|
Summary: | Typo in models/expressions documentation → Typo in docs/ref/models/expressions.txt. |
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
PR