From 558206137b653aaed73e9ed7efd1e0576d3141bb Mon Sep 17 00:00:00 2001 From: PidgeyL Date: Fri, 10 Apr 2015 09:32:47 +0200 Subject: [PATCH] Bugfix by @rlintu --- sbin/db_mgmt_cpe_other_dictionary.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/db_mgmt_cpe_other_dictionary.py b/sbin/db_mgmt_cpe_other_dictionary.py index 393fac72d..9ba0c8f89 100644 --- a/sbin/db_mgmt_cpe_other_dictionary.py +++ b/sbin/db_mgmt_cpe_other_dictionary.py @@ -84,7 +84,8 @@ title = title.title() batch.append({'id': cpeentry, 'title': title}) -cpeother.insert(batch) +if len(batch) != 0: + cpeother.insert(batch) #update database info after successful program-run info.update({'db': 'cpeother'}, {"$set": {'last-modified': icve['last-modified']}}, upsert=True)