forked from mirrors/thatmattlove-hyperglass
use VRF display_name for error handling
This commit is contained in:
parent
3d04bbdd47
commit
d3e3c05707
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ class Query(BaseModel):
|
|||
query_vrf: Optional[StrictStr]
|
||||
query_target: StrictStr
|
||||
|
||||
@validator("query_location")
|
||||
@validator("query_location", pre=True, always=True)
|
||||
def validate_query_location(cls, value):
|
||||
"""Ensure query_location is defined.
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ class Query(BaseModel):
|
|||
raise InputInvalid(
|
||||
params.messages.vrf_not_associated,
|
||||
alert="warning",
|
||||
vrf_name=value,
|
||||
vrf_name=vrf.display_name,
|
||||
device_name=device.display_name,
|
||||
)
|
||||
if value is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue