Add check if no results in __normalize method

This commit is contained in:
jar3b 2016-03-21 13:17:23 +03:00
parent 2b71f7680e
commit c99db3ceea

View File

@ -71,6 +71,8 @@ class FiasFactory:
sql_query = self.normalize_templ.replace("//aoid", aoid_guid) sql_query = self.normalize_templ.replace("//aoid", aoid_guid)
rows = self.db.get_rows(sql_query, True) rows = self.db.get_rows(sql_query, True)
assert len(rows), "Record with this AOID not found in DB"
except Exception, err: except Exception, err:
if BasicConfig.logging: if BasicConfig.logging:
logging.error(traceback.format_exc(err)) logging.error(traceback.format_exc(err))