13132 add gettext_lazy to models

This commit is contained in:
Arthur 2023-07-11 19:49:27 +07:00 committed by Jeremy Stretch
parent 4c2f8b66cb
commit bc39ab2c91

View File

@ -825,8 +825,8 @@ class IPAddress(PrimaryModel):
any(dip.role not in IPADDRESS_ROLES_NONUNIQUE for dip in duplicate_ips) any(dip.role not in IPADDRESS_ROLES_NONUNIQUE for dip in duplicate_ips)
): ):
raise ValidationError({ raise ValidationError({
'address': _("Duplicate IP address found in {}: {}".format( 'address': _("Duplicate IP address found in {}: {}").format(
"VRF {}").format(self.vrf) if self.vrf else _("global table"), _("VRF {}").format(self.vrf) if self.vrf else _("global table"),
duplicate_ips.first(), duplicate_ips.first(),
) )
}) })