Use raw string to satisfy linter rules

This commit is contained in:
Alan Rominger 2022-10-19 11:07:43 -04:00
parent 4d9b8400da
commit 6f85aef5fe
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559

View File

@ -4934,7 +4934,7 @@ class InstanceSerializer(BaseSerializer):
MaxLengthValidator(limit_value=250),
validators.UniqueValidator(queryset=Instance.objects.all()),
RegexValidator(
regex='^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$',
regex=r'^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$',
flags=re.IGNORECASE,
inverse_match=True,
message="hostname cannot be localhost or 127.0.0.1",