Skip to content

Commit

Permalink
[utils] adding friend+mention policy map to enums (#425)
Browse files Browse the repository at this point in the history
* adding the 2 new policy maps to enums.py

* very important bug fix
  • Loading branch information
imtherealF1 authored Sep 20, 2024
1 parent 65f31a6 commit c6566f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ballsdex/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 4 additions & 0 deletions ballsdex/core/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

0 comments on commit c6566f0

Please sign in to comment.