Преглед изворни кода

Attempt to fix weird row unpack error

Foppe Hemminga пре 6 година
родитељ
комит
a5d768a2d8
1 измењених фајлова са 2 додато и 1 уклоњено
  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