Skip to content

Commit

Permalink
fix: Don't copy ancestor's meta, to avoid indicating incorrect counts
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed May 25, 2024
1 parent 7296179 commit 8aa6d59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workers/extract/dataset_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def callback(client_state, channel, method, properties, input_message):
cursor.execute(
"""\
INSERT INTO dataset (name, meta, ancestor_id)
SELECT name, meta, NULL FROM dataset WHERE id = %(dataset_id)s
SELECT name, '{}'::jsonb, NULL FROM dataset WHERE id = %(dataset_id)s
RETURNING id
""",
{"dataset_id": dataset_id_original},
Expand Down
4 changes: 2 additions & 2 deletions workers/extract/kingfisher_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def callback(client_state, channel, method, properties, input_message):
cursor.execute(
"""\
INSERT INTO dataset (name, meta, ancestor_id)
VALUES (%(name)s, %(meta)s, %(ancestor_id)s)
VALUES (%(name)s, '{}'::jsonb, %(ancestor_id)s)
RETURNING id
""",
{"name": name, "meta": Json({}), "ancestor_id": ancestor_id},
{"name": name, "ancestor_id": ancestor_id},
)
dataset_id = cursor.fetchone()[0]

Expand Down

0 comments on commit 8aa6d59

Please sign in to comment.