diff options
| author | Tim Graham <timograham@gmail.com> | 2017-02-27 09:28:02 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-27 09:28:02 -0500 |
| commit | 82026d61a383d07cd840a0d30443ee66bd99798b (patch) | |
| tree | fd87c00cde62832d5ca2b082a9f6be5180871a8c | |
| parent | fba4f831bc75369c975a95c9b7774e9e89f8a2f9 (diff) | |
Refs #27843 -- Fixed 'invalid escape sequence' warning in truncate_name().
| -rw-r--r-- | django/db/backends/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py index 81eb8693ac..b5ad5f17a2 100644 --- a/django/db/backends/utils.py +++ b/django/db/backends/utils.py @@ -183,7 +183,7 @@ def truncate_name(name, length=None, hash_len=4): If a quote stripped name contains a username, e.g. USERNAME"."TABLE, truncate the table portion only. """ - match = re.match('([^"]+)"\."([^"]+)', name) + match = re.match(r'([^"]+)"\."([^"]+)', name) table_name = match.group(2) if match else name if length is None or len(table_name) <= length: |
