feat(chalice): changed card-funnel

feat(DB): changed migration script
This commit is contained in:
Taha Yassine Kraiem 2023-01-20 18:02:03 +01:00
parent a4fb0e259b
commit 94f531dbad
2 changed files with 8 additions and 1 deletions

View file

@ -1049,7 +1049,9 @@ class CreateCardSchema(CardChartSchema):
assert values.get("metric_value") is None or len(values.get("metric_value")) == 0, \
f"metricValue is only available for metricOf:{MetricOfTable.issues}"
elif values.get("metric_type") == MetricType.funnel:
assert len(values["series"]) == 1, f"must have only 1 series for metricType:{MetricType.funnel}"
pass
# allow UI sot send empty series for funnel
# assert len(values["series"]) == 1, f"must have only 1 series for metricType:{MetricType.funnel}"
# ignore this for now, let the UI send whatever he wants for metric_of
# assert isinstance(values.get("metric_of"), MetricOfTimeseries), \
# f"metricOf must be of type {MetricOfTimeseries} for metricType:{MetricType.funnel}"

View file

@ -325,6 +325,11 @@ $$
LANGUAGE plpgsql;
DROP FUNCTION get_new_filter_key;
DROP FUNCTION get_new_event_filter_key;
DROP FUNCTION get_new_event_key;
COMMIT;
CREATE INDEX CONCURRENTLY IF NOT EXISTS clicks_selector_idx ON events.clicks (selector);