diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-03 11:20:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 11:20:46 +0100 |
| commit | c5cd8783825b5f6384417dac5f3889b4210b7d08 (patch) | |
| tree | 3d4689aaa0e209e40d2d8df09edad7e155960b45 /django/db/models/sql | |
| parent | c9d6e3595cfd0aa58cde1656bd735ecfcd7a872b (diff) | |
Refs #33476 -- Refactored problematic code before reformatting by Black.
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index e3fdea6f3a..1dc770ae3a 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1735,8 +1735,7 @@ class Query(BaseExpression): for alias in self._gen_col_aliases([annotation]): if isinstance(self.alias_map[alias], Join): raise FieldError( - 'Joined field references are not permitted in ' - 'this query' + 'Joined field references are not permitted in this query' ) if summarize: # Summarize currently means we are doing an aggregate() query @@ -1763,8 +1762,9 @@ class Query(BaseExpression): if not allow_joins and len(join_list) > 1: raise FieldError('Joined field references are not permitted in this query') if len(targets) > 1: - raise FieldError("Referencing multicolumn fields with F() objects " - "isn't supported") + raise FieldError( + "Referencing multicolumn fields with F() objects isn't supported" + ) # Verify that the last lookup in name is a field or a transform: # transform_function() raises FieldError if not. transform = join_info.transform_function(targets[0], final_alias) |
