mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 00:38:06 +00:00
fix: ensure query_target is transformed after validation
Transformation must occur after validation, or else the transformation will possibly make the validation fail
This commit is contained in:
parent
f67c676a2d
commit
23522da754
1 changed files with 2 additions and 2 deletions
|
|
@ -65,13 +65,13 @@ class Query(BaseModel):
|
|||
|
||||
self._input_plugin_manager = InputPluginManager()
|
||||
|
||||
self.query_target = self.transform_query_target()
|
||||
|
||||
try:
|
||||
self.validate_query_target()
|
||||
except InputValidationError as err:
|
||||
raise InputInvalid(**err.kwargs) from err
|
||||
|
||||
self.query_target = self.transform_query_target()
|
||||
|
||||
def summary(self) -> SimpleQuery:
|
||||
"""Summarized and post-validated model of a Query."""
|
||||
return SimpleQuery(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue