I scrape the site and write the result in the database, some elements may be None, this is not a problem, in the database they are displayed as NULL.
The problem is that before writing to the database, I check if this record already exists or not:
cursor = await db.execute('SELECT * FROM MATCHES WHERE (a="{}" AND b="{}" AND c="{}".format(a, b, c)))
The problem is that SELECT thinks that a = 'None'but not a = None
And this is strange because when recording everything is ok:
INSERT INTO MATCHES (a, b, c) VALUES (?,?,?), (a, b, c)
In this case, if some element is None in the database then it will be NULL
I tried another option:
SELECT * FROM MATCHES WHERE (a=? AND b=? AND c=?), (a, b, c)
But it works like the first. What can I do?