Skip to content

Commit

Permalink
fix: 忽略消息订阅字段权限
Browse files Browse the repository at this point in the history
  • Loading branch information
nineaiyu committed Nov 2, 2024
1 parent 7d07663 commit 15eb5dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions notifications/serializers/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


class SystemMsgSubscriptionSerializer(BaseModelSerializer):
ignore_field_permission = True
receive_backends = serializers.ListField(child=serializers.CharField())
message_type_label = serializers.CharField(read_only=True)
receivers = BasePrimaryKeyRelatedField(attrs=['pk', 'username', 'nickname'], read_only=True, source='users',
Expand All @@ -32,6 +33,7 @@ class SystemMsgSubscriptionByCategorySerializer(serializers.Serializer):


class UserMsgSubscriptionSerializer(BaseModelSerializer):
ignore_field_permission = True
receive_backends = serializers.ListField(child=serializers.CharField())
message_type_label = serializers.CharField(read_only=True, label=_("Message Type"))
receivers = BasePrimaryKeyRelatedField(attrs=['pk', 'username', 'nickname'], read_only=True, label=_("User"),
Expand Down

0 comments on commit 15eb5dc

Please sign in to comment.