Skip to content

Commit ac3880b

Browse files
authored
Merge pull request #525 from cmu-delphi/sgratzl/filter_fields
feat: support filtering fields in correlation, trend, and backfill
2 parents 998ca18 + 6a96a6c commit ac3880b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/server/endpoints/covidcast.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
parse_single_time_arg,
2222
parse_single_geo_arg,
2323
)
24-
from .._query import QueryBuilder, execute_query, run_query, parse_row
24+
from .._query import QueryBuilder, execute_query, run_query, parse_row, filter_fields
2525
from .._printer import create_printer, CSVPrinter
2626
from .._validate import (
2727
extract_date,
@@ -200,7 +200,7 @@ def gen(rows):
200200
raise DatabaseErrorException(str(e))
201201

202202
# now use a generator for sending the rows and execute all the other queries
203-
return p(gen(r))
203+
return p(filter_fields(gen(r)))
204204

205205

206206
@bp.route("/correlation", methods=("GET", "POST"))
@@ -260,7 +260,7 @@ def gen():
260260
yield cor.asdict()
261261

262262
# now use a generator for sending the rows and execute all the other queries
263-
return p(gen())
263+
return p(filter_fields(gen()))
264264

265265

266266
@bp.route("/csv", methods=("GET", "POST"))
@@ -405,7 +405,7 @@ def gen(rows):
405405
raise DatabaseErrorException(str(e))
406406

407407
# now use a generator for sending the rows and execute all the other queries
408-
return p(gen(r))
408+
return p(filter_fields(gen(r)))
409409

410410

411411
@bp.route("/meta", methods=("GET", "POST"))

0 commit comments

Comments
 (0)