Reforming data inserts

This commit is contained in:
Raelon Masters
2020-06-14 23:58:31 -04:00
parent be5ac2d94f
commit d635c5252c
2 changed files with 21 additions and 2 deletions

View File

@@ -78,6 +78,9 @@ class Storage:
)
return True
except Exception as e:
if int(e.pgcode) == 22007:
book[7] = psycopg2.Date(int(book[7]), 1, 1)
self.insert_book(book)
print(e)
return False