Skip to content

Commit

Permalink
Update booking.py
Browse files Browse the repository at this point in the history
  • Loading branch information
XuYinzhe committed Apr 25, 2022
1 parent 2845eea commit e708bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions database/booking.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def checkavailable(db, name, date, format_data):
if t in day[date]: continue
time_data = date + " " + t[:2] + ':' + t[2:] + ':00'
# print(time_data)
print(datetime.strptime(time_data, format_data))
#print(datetime.strptime(time_data, format_data))

def bookroom(db, name, date, format_data):
checkavailable(db, roomone['_id'], time_data, format_data)
checkavailable(db, roomone['_id'], date, format_data)
room = db.find_one({"_id": name})
day = room["available"]
ft, tt, user = map(str, input("from time & to time & use id: 0800 0900 ust.hk\n").split())
Expand All @@ -90,7 +90,7 @@ def bookroom(db, name, date, format_data):
rooms = db['rooms']
fs = gridfs.GridFS(db)

createnewroom(fs, rooms, 'ieda.jpg', ["IEDA Conference Room", "5554"])
#createnewroom(fs, rooms, 'ieda.jpg', ["IEDA Conference Room", "5554"])

# roomlist = findroomlist(rooms, "5554")
roomone = findroomone(rooms, "5554")
Expand Down

0 comments on commit e708bf9

Please sign in to comment.