aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/sandcrawler/db.py3
1 files changed, 2 insertions, 1 deletions
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]