From 5af1a78d931ef75400c74eecc3160230320d9860 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Tue, 19 Feb 2019 08:55:32 +0000 Subject: [PATCH] Only replace the mapping if there are more old entries than correct ones --- parse.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/parse.php b/parse.php index c6406b3..8e0bb4c 100644 --- a/parse.php +++ b/parse.php @@ -79,7 +79,7 @@ $previousMapping = NULL; if($incorrect > $correct && $maxWeight > $weight) { throw new Exception('Ignoring result due to better data already present'); - } elseif($old > 0 && $incorrect == 0) { + } elseif($old > $correct) { $logger->warn('Replacing DB data with the new mapping'); $db->clear(); } else { -- Gitblit v1.9.1