mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #34233 -- Used str.removeprefix()/removesuffix().
This commit is contained in:
@@ -312,7 +312,7 @@ would override ``get_lookup`` with something like::
|
||||
def get_lookup(self, lookup_name):
|
||||
if lookup_name.startswith('x'):
|
||||
try:
|
||||
dimension = int(lookup_name[1:])
|
||||
dimension = int(lookup_name.removeprefix("x"))
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user