From 67e803b5e5f93a01804e1336db26c01ea1e7ec7d Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Wed, 26 Jun 2024 11:22:31 +0200 Subject: [PATCH] make admin exempt from created_recently restrictions --- app/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models.py b/app/models.py index 1f0b73bf..4ecf37cd 100644 --- a/app/models.py +++ b/app/models.py @@ -846,6 +846,8 @@ class User(UserMixin, db.Model): return result def created_recently(self): + if self.is_admin(): + return False return self.created and self.created > utcnow() - timedelta(days=7) def has_blocked_instance(self, instance_id: int):