Explorar o código

Attempt to fix weird row unpack error

Foppe Hemminga %!s(int64=6) %!d(string=hai) anos
pai
achega
a5d768a2d8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      main.py

+ 2 - 1
main.py

@@ -62,8 +62,9 @@ if __name__ == '__main__':
                 # if type(row) == 'datetime.time':
                 #     continue
                 try:
+                    date_in_db_row_formatted = row.race_date.strftime('%Y-%m-%d')
                     if (
-                            scratching.date == row.race_date.strftime('%Y-%m-%d') and
+                            scratching.date == date_in_db_row_formatted and
                             scratching.venue == row.venue and
                             int(scratching.race) == int(row.race) and
                             scratching.horse == row.horse