|
|
@@ -1,3 +1,5 @@
|
|
|
+import datetime
|
|
|
+
|
|
|
import psycopg2.extras
|
|
|
import model
|
|
|
# from pprint import pprint
|
|
|
@@ -69,7 +71,8 @@ if __name__ == '__main__':
|
|
|
found_in_database = True
|
|
|
if not found_in_database:
|
|
|
# report new scratching
|
|
|
- day_abbr = scratching.date.strftime('%a')
|
|
|
+ date_object = datetime.datetime.strptime(scratching.date, "%Y%m%d").date()
|
|
|
+ day_abbr = date_object.strftime('%a')
|
|
|
message = 'New scratching: venue = {} {} {}-{} | race = {} | horse = {}'.format(day_abbr,
|
|
|
scratching.date,
|
|
|
scratching.state,
|