Fix error handling and correct variable for function check_entry_exist (Thank you mirux)

This commit is contained in:
Schimon Jehudah 2024-05-12 11:05:49 +00:00
parent 8bbad28894
commit 34da47bcd2

View file

@ -3067,7 +3067,7 @@ def check_entry_exist(db_file, feed_id, identifier=None, title=None, link=None,
""" """
SELECT id SELECT id
FROM entries_properties FROM entries_properties
WHERE title = :title AND link = :link AND published = :published WHERE title = :title AND link = :link AND published = :date
""" """
) )
par = { par = {
@ -3079,8 +3079,8 @@ def check_entry_exist(db_file, feed_id, identifier=None, title=None, link=None,
result = cur.execute(sql, par).fetchone() result = cur.execute(sql, par).fetchone()
if result: exist = True if result: exist = True
except: except:
logger.error("source =", feed_id) logger.error("source =" + feed_id)
logger.error("published =", published) logger.error("published =" + published)
else: else:
sql = ( sql = (
""" """