Skip to content

Commit

Permalink
Merge pull request #267 from open-contracting/fix/jsonlines
Browse files Browse the repository at this point in the history
fix: flatten with jsonlines input
  • Loading branch information
mariob0y authored Jun 15, 2021
2 parents d58659d + d78661e commit dd1ef56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,14 @@ def flatten_data(flatten_id, model=None, lang_code="en_US"):
formats[flatten.export_format] = workdir
else:
formats[flatten.export_format] = "result.xlsx"
flattener = FileFlattener(workdir, options, tables=spec.tables, pkg_type=datasource.root_key, **formats)
flattener = FileFlattener(
workdir,
options,
tables=spec.tables,
pkg_type=datasource.root_key,
multiple_values=getattr(spec, "multiple_values", False),
**formats,
)
timestamp = time.time()
for count in flattener.flatten_file(datasource.file.path):
if (time.time() - timestamp) <= 1:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile
#
spoonbill==1.0.3b3
spoonbill==1.0.4b3
# via -r requirements.in
aioredis==1.3.1
# via channels-redis
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# pip-compile requirements_dev.in
#
spoonbill==1.0.3b3
spoonbill==1.0.4b3
# via -r requirements.in
aioredis==1.3.1
# via channels-redis
Expand Down

0 comments on commit dd1ef56

Please sign in to comment.