Spaces:
Running
Running
James McCool
commited on
Commit
·
ba685f6
1
Parent(s):
6401015
Fix date parsing in init_conn function of app.py to include time component. Updated date format from "%Y-%m-%d" to "%Y-%m-%d %H:%M:%S" for accurate datetime object creation, enhancing data consistency in game logs retrieval.
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def init_conn():
|
|
14 |
db = client["League_of_Legends_Database"]
|
15 |
|
16 |
collection = db["gamelogs"]
|
17 |
-
min_date = datetime.strptime(collection.find_one({}, sort=[("date", 1)])["date"], "%Y-%m-%d")
|
18 |
-
max_date = datetime.strptime(collection.find_one({}, sort=[("date", -1)])["date"], "%Y-%m-%d")
|
19 |
team_names = collection.distinct("teamname")
|
20 |
player_names = collection.distinct("playername")
|
21 |
|
|
|
14 |
db = client["League_of_Legends_Database"]
|
15 |
|
16 |
collection = db["gamelogs"]
|
17 |
+
min_date = datetime.strptime(collection.find_one({}, sort=[("date", 1)])["date"], "%Y-%m-%d %H:%M:%S")
|
18 |
+
max_date = datetime.strptime(collection.find_one({}, sort=[("date", -1)])["date"], "%Y-%m-%d %H:%M:%S")
|
19 |
team_names = collection.distinct("teamname")
|
20 |
player_names = collection.distinct("playername")
|
21 |
|