Merge remote-tracking branch 'origin/api-v1.10.0' into dev
This commit is contained in:
commit
f13aadb34a
4 changed files with 5 additions and 3 deletions
|
|
@ -283,6 +283,7 @@ def custom_alert_to_front(values):
|
|||
# to support frontend format for payload
|
||||
if values.get("seriesId") is not None and values["query"]["left"] == schemas.AlertColumn.custom:
|
||||
values["query"]["left"] = values["seriesId"]
|
||||
values["seriesId"] = None
|
||||
return values
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -363,7 +363,8 @@ class AlertSchema(BaseModel):
|
|||
|
||||
@root_validator(pre=True)
|
||||
def transform_alert(cls, values):
|
||||
if values.get("seriesId") is None and isinstance(values["query"]["left"], int):
|
||||
values["seriesId"] = None
|
||||
if isinstance(values["query"]["left"], int):
|
||||
values["seriesId"] = values["query"]["left"]
|
||||
values["query"]["left"] = AlertColumn.custom
|
||||
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ $$
|
|||
LANGUAGE plpgsql;
|
||||
|
||||
|
||||
-- To migrate saved metric_series data
|
||||
-- To migrate metric_series data
|
||||
DO
|
||||
$$
|
||||
DECLARE
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ $$
|
|||
LANGUAGE plpgsql;
|
||||
|
||||
|
||||
-- To migrate saved metric_series data
|
||||
-- To migrate metric_series data
|
||||
DO
|
||||
$$
|
||||
DECLARE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue