Browse Source

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

pull/6680/head
Bai 3 years ago committed by Jiangjie.Bai
parent
commit
52d3e1b34b
  1. 2
      apps/assets/serializers/asset.py

2
apps/assets/serializers/asset.py

@ -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