Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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 Hongtao Ma, 5 years ago

Owner: changed from nobody to Hongtao Ma

comment:2 by Mariusz Felisiak, 5 years ago

Has patch: set
Summary: Typo in models/expressions documentationTypo in docs/ref/models/expressions.txt.
Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In cebd41e4:

Fixed #31110 -- Fixed typo in docs/ref/models/expressions.txt.

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In b1a309f6:

[3.0.x] Fixed #31110 -- Fixed typo in docs/ref/models/expressions.txt.

Backport of cebd41e41603c3ca77c5b29d6cd20c1bff43827f from master

Note: See TracTickets for help on using tickets.
Back to Top