Skip to content

Commit 6f697e3

Browse files
committed
fix: trendseries serialization + require signal in coverage endpoint
1 parent 59e35d6 commit 6f697e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/server/endpoints/covidcast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ def handle_trendseries():
243243
def gen(rows):
244244
for key, group in groupby((parse_row(row, fields_string, fields_int, fields_float) for row in rows), lambda row: (row["geo_type"], row["geo_value"], row["source"], row["signal"])):
245245
trends = compute_trends(key[0], key[1], key[2], key[3], shifter, ((row["time_value"], row["value"]) for row in group))
246-
for t in trends:
247-
yield t
246+
for trend in trends:
247+
yield trend.asdict()
248248

249249
# execute first query
250250
try:
@@ -500,7 +500,7 @@ def handle_coverage():
500500
similar to /signal_dashboard_coverage for a specific signal returns the coverage (number of locations for a given geo_type)
501501
"""
502502

503-
signal = parse_source_signal_arg("signal")
503+
signal = parse_source_signal_pairs()
504504
geo_type = request.args.get("geo_type", "county")
505505
if "window" in request.values:
506506
time_window = parse_day_range_arg("window")

0 commit comments

Comments
 (0)