fix: 修改协议错误信息翻译

pull/6680/head
Bai 3 years ago committed by Jiangjie.Bai
parent bf6fcc9020
commit 52d3e1b34b

@ -17,7 +17,7 @@ __all__ = [
class ProtocolField(serializers.RegexField):
protocols = '|'.join(dict(Asset.Protocol.choices).keys())
default_error_messages = {
'invalid': _('Protocol format should {}/{}'.format(protocols, '1-65535'))
'invalid': _('Protocol format should {}/{}').format(protocols, '1-65535')
}
regex = r'^(%s)/(\d{1,5})$' % protocols

Loading…
Cancel
Save