diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-18 19:11:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 19:11:18 +0100 |
commit | 23e886886249ebe8f80a48b0d25fbb5308eeb06f (patch) | |
tree | ddd2eb220750704fa4fbfd8447654fc3d382bd10 /django/db/models/sql/query.py | |
parent | fd21f82aa82b0d75a161f618ef944ebe0923e0ab (diff) | |
download | django-23e886886249ebe8f80a48b0d25fbb5308eeb06f.tar.gz |
Refs #34233 -- Used str.removeprefix()/removesuffix().
Diffstat (limited to 'django/db/models/sql/query.py')
-rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 3fe00002bd..0aa07e0b99 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -2163,8 +2163,7 @@ class Query(BaseExpression): if isinstance(item, str): if item == "?": continue - if item.startswith("-"): - item = item[1:] + item = item.removeprefix("-") if item in self.annotations: continue if self.extra and item in self.extra: |