correct type datetime
This commit is contained in:
parent
438fd2c6e4
commit
fcd618db18
@ -38,7 +38,7 @@ class Appointment(db.Entity):
|
||||
id = PrimaryKey(int, auto=True)
|
||||
book_datetime = Required(datetime)
|
||||
start_datetime = Required(datetime)
|
||||
end_datetime = Required(str)
|
||||
end_datetime = Required(datetime)
|
||||
localisation = Optional(str, nullable=True)
|
||||
is_unavaillable = Required(bool)
|
||||
service = Required(Service)
|
||||
@ -128,6 +128,7 @@ def parse_uri(database_uri):
|
||||
|
||||
def init_database(database_uri):
|
||||
settings = parse_uri(database_uri)
|
||||
|
||||
db.bind(**settings)
|
||||
db.generate_mapping(check_tables=False)
|
||||
try:
|
||||
@ -138,3 +139,5 @@ def init_database(database_uri):
|
||||
|
||||
def release_database():
|
||||
db.disconnect()
|
||||
db.provider = None
|
||||
db.schema = None
|
||||
|
Loading…
Reference in New Issue
Block a user