We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4023dd commit 46bddd0Copy full SHA for 46bddd0
1 file changed
app/statistics/router.py
@@ -72,8 +72,8 @@ def get_statistics_by_month(
72
):
73
stats = db.query(EmotionStatistics).filter(
74
EmotionStatistics.user_id == current_user.id,
75
- extract("year", EmotionStatistics.created_at) == year,
76
- extract("month", EmotionStatistics.created_at) == month
+ EmotionStatistics.year == year,
+ EmotionStatistics.month == month
77
).all()
78
79
if not stats:
0 commit comments