From c6566f0d192d9ec3cb72f8c8956e1dbf86decd91 Mon Sep 17 00:00:00 2001 From: imtherealF1 <168587794+imtherealF1@users.noreply.github.com> Date: Fri, 20 Sep 2024 21:41:45 +0300 Subject: [PATCH] [utils] adding friend+mention policy map to enums (#425) * adding the 2 new policy maps to enums.py * very important bug fix --- ballsdex/core/models.py | 2 +- ballsdex/core/utils/enums.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ballsdex/core/models.py b/ballsdex/core/models.py index af63b7d21..b86ce778b 100755 --- a/ballsdex/core/models.py +++ b/ballsdex/core/models.py @@ -429,7 +429,7 @@ class Player(models.Model): friend_policy = fields.IntEnumField( FriendPolicy, description="How you want to handle friend requests", - default=MentionPolicy.ALLOW, + default=FriendPolicy.ALLOW, ) balls: fields.BackwardFKRelation[BallInstance] diff --git a/ballsdex/core/utils/enums.py b/ballsdex/core/utils/enums.py index 53d17ce9f..30c4f230b 100644 --- a/ballsdex/core/utils/enums.py +++ b/ballsdex/core/utils/enums.py @@ -6,3 +6,7 @@ } PRIVATE_POLICY_MAP = {1: "Public", 2: "Private", 3: "Mutual Servers", 4: "Friends"} + +MENTION_POLICY_MAP = {1: "Allow all mentions", 2: "Deny all mentions"} + +FRIEND_POLICY_MAP = {1: "Allow all friend requests", 2: "Deny all friend requests"}