From c99db3ceeae9529d1d36a15c847a14742576ed12 Mon Sep 17 00:00:00 2001 From: jar3b Date: Mon, 21 Mar 2016 13:17:23 +0300 Subject: [PATCH] Add check if no results in __normalize method --- aore/search/fiasfactory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aore/search/fiasfactory.py b/aore/search/fiasfactory.py index 04a2553..defefaa 100644 --- a/aore/search/fiasfactory.py +++ b/aore/search/fiasfactory.py @@ -71,6 +71,8 @@ class FiasFactory: sql_query = self.normalize_templ.replace("//aoid", aoid_guid) rows = self.db.get_rows(sql_query, True) + + assert len(rows), "Record with this AOID not found in DB" except Exception, err: if BasicConfig.logging: logging.error(traceback.format_exc(err))