diff --git a/drama/classes/__init__.py b/drama/classes/__init__.py index 6e0e68d786..344a02172e 100644 --- a/drama/classes/__init__.py +++ b/drama/classes/__init__.py @@ -13,4 +13,5 @@ from .domains import * from .subscriptions import * from .agents import * from .lolwtf import * -from .mod_logs import * \ No newline at end of file +from .mod_logs import * +from .award import * diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 0c0d10106b..6f9f2a802b 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -257,10 +257,10 @@ def participation_stats(v): "comments_last_24h": g.db.query(Comment).filter(Comment.created_utc > day).count(), "post_votes": g.db.query(Vote).count(), "post_voting_users": g.db.query(Vote.user_id).distinct().count(), - "post_votes_last_24h": g.db.query(Vote).filter(Vote.created_utc > day).count(), "comment_votes": g.db.query(CommentVote).count(), "comment_voting_users": g.db.query(CommentVote.user_id).distinct().count(), - "comment_votes_last_24h": g.db.query(CommentVote).filter(CommentVote.created_utc > day).count() + "total_awards": g.db.query(AwardRelationship).count(), + "awards_given": g.db.query(AwardRelationship).filter(AwardRelationship.submission_id == None, AwardRelationship.comment_id == None).count() }