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/apps/registry.py | |
| parent | fd21f82aa82b0d75a161f618ef944ebe0923e0ab (diff) | |
Refs #34233 -- Used str.removeprefix()/removesuffix().
Diffstat (limited to 'django/apps/registry.py')
| -rw-r--r-- | django/apps/registry.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/apps/registry.py b/django/apps/registry.py index 4abf828ca1..1cdb33b7f0 100644 --- a/django/apps/registry.py +++ b/django/apps/registry.py @@ -261,7 +261,7 @@ class Apps: candidates = [] for app_config in self.app_configs.values(): if object_name.startswith(app_config.name): - subpath = object_name[len(app_config.name) :] + subpath = object_name.removeprefix(app_config.name) if subpath == "" or subpath[0] == ".": candidates.append(app_config) if candidates: |
