From 205d8aefe7c9974d42a17d22b02376efb0f45536 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 28 Jul 2021 06:00:13 +0000 Subject: [PATCH 1/5] schema --- profile.gif | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 profile.gif diff --git a/profile.gif b/profile.gif new file mode 100644 index 0000000000..e69de29bb2 From 9de59c6a0a9f86642c5ea48e7efa938f570da399 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Wed, 28 Jul 2021 11:31:16 +0200 Subject: [PATCH 2/5] sneed --- drama/classes/__init__.py | 3 ++- drama/routes/admin.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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() } From c19bd1a19f728c0e330b9a3fd70ea9f28255c708 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Wed, 28 Jul 2021 11:32:39 +0200 Subject: [PATCH 3/5] sneed --- drama/routes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 6f9f2a802b..5a53a6fbe9 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -260,7 +260,7 @@ def participation_stats(v): "comment_votes": g.db.query(CommentVote).count(), "comment_voting_users": g.db.query(CommentVote.user_id).distinct().count(), "total_awards": g.db.query(AwardRelationship).count(), - "awards_given": g.db.query(AwardRelationship).filter(AwardRelationship.submission_id == None, AwardRelationship.comment_id == None).count() + "awards_given": g.db.query(AwardRelationship).filter(or_(AwardRelationship.submission_id != None, AwardRelationship.comment_id != None)).count() } From 65d3dd44ba0db185de4a60c4b57f3183af3bb319 Mon Sep 17 00:00:00 2001 From: fireworks88 Date: Wed, 28 Jul 2021 11:39:07 +0200 Subject: [PATCH 4/5] sneed --- drama/routes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 5a53a6fbe9..feb0acdc34 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -241,7 +241,7 @@ def participation_stats(v): data = {"valid_users": g.db.query(User).count(), "private_users": g.db.query(User).filter_by(is_private=False).count(), - "banned_users": g.db.query(User).filter(User.is_banned > 0, User.unban_utc == None).count(), + "banned_users": g.db.query(User).filter(User.is_banned > 0).count(), "verified_users": g.db.query(User).filter_by(is_activated=True).count(), "signups_last_24h": g.db.query(User).filter(User.created_utc > day).count(), "total_posts": g.db.query(Submission).count(), From 294e786698026c72ad25e9e32845b28eb8d22e35 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 28 Jul 2021 11:00:25 +0000 Subject: [PATCH 5/5] schema --- schema.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema.sql b/schema.sql index 80b3cdabdc..ab010046ce 100644 --- a/schema.sql +++ b/schema.sql @@ -225,7 +225,8 @@ CREATE TABLE public.users ( animatedname boolean, suicide_utc integer, post_count integer, - comment_count integer + comment_count integer, + highres text );