From bac2d50d00211c6750705ded725c6f0bc6bacabf Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 5 Feb 2020 23:10:26 -0800 Subject: fix bug where ingest_request extra fields not persisted --- python/sandcrawler/db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sandcrawler/db.py b/python/sandcrawler/db.py index 3ec325e..53d159f 100644 --- a/python/sandcrawler/db.py +++ b/python/sandcrawler/db.py @@ -189,7 +189,8 @@ class SandcrawlerPostgresClient: raise NotImplementedError("on_conflict: {}".format(on_conflict)) sql += " RETURNING xmax;" for r in batch: - extra = dict() + # in case these fields were already packed into 'request' + extra = r.get('request', {}) for k in ('ext_ids', 'fatcat_release', 'edit_extra'): if r.get(k): extra[k] = r[k] -- cgit v1.2.3