Skip to content

Commit

Permalink
Fix stats
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Nov 4, 2024
1 parent 48ca50e commit fb2ed90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IM/Stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_stats(init_date="1970-01-01", end_date=None, auth=None):
if db.db_type == DataBase.MONGO:
filt = InfrastructureList._gen_filter_from_auth(auth)
if end_date:
filt["date"] = {"$lte": end_date}
filt["date"] = {"$lte": datetime.datetime.strptime(end_date, "%Y-%m-%d").timestamp}
res = db.find("inf_list", filt, {"id": True, "data": True, "date": True}, [('id', -1)])
else:
where = InfrastructureList._gen_where_from_auth(auth)
Expand Down

0 comments on commit fb2ed90

Please sign in to comment.