Testeando error en geocoder.

This commit is contained in:
pablomartincalvo 2018-10-22 00:15:44 +02:00
parent 0248e75606
commit 29072f0926
2 changed files with 119 additions and 105 deletions

View file

@ -60,17 +60,15 @@ class CapturasInterface():
def not_geocoded_captura_exists(self):
query_statement = """
SELECT *
SELECT COUNT(referencia)
FROM anuncios.capturas
WHERE `precision` IS NULL
LIMIT 1"""
WHERE `precision` IS NULL"""
cursor_result = self.anunciosdb.query(query_statement, dictionary=True)
try:
result = cursor_result.fetchone()
return True
except:
return False
result = cursor_result.fetchone()[0]
return result > 0
def get_not_geocoded_captura(self):
query_statement = """