2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

upgrade to pyhton 3.9 syntax

using pyupgrade
This commit is contained in:
Matthias
2022-05-01 21:53:12 +02:00
parent b59a4d53f0
commit d05472b30c
11 changed files with 16 additions and 18 deletions

View File

@ -2510,7 +2510,7 @@ def validate_template_name(name):
Prevent illegal characters in "name" field for PartParameterTemplate
"""
for c in "!@#$%^&*()<>{}[].,?/\|~`_+-=\'\"":
for c in "!@#$%^&*()<>{}[].,?/\\|~`_+-=\'\"":
if c in str(name):
raise ValidationError(_(f"Illegal character in template name ({c})"))