Browse Source

perf: Acl action add notify and warn

pull/14095/head
feng 3 months ago committed by feng626
parent
commit
054d385ffc
  1. 1
      apps/acls/const.py
  2. 2
      apps/acls/serializers/base.py

1
apps/acls/const.py

@ -8,3 +8,4 @@ class ActionChoices(models.TextChoices):
review = 'review', _('Review')
warning = 'warning', _('Warn')
notice = 'notice', _('Notify')
notify_and_warn = 'notify_and_warn', _('Notify and warn')

2
apps/acls/serializers/base.py

@ -62,7 +62,7 @@ class ActionAclSerializer(serializers.Serializer):
self.set_action_choices()
class Meta:
action_choices_exclude = [ActionChoices.warning]
action_choices_exclude = [ActionChoices.warning, ActionChoices.notify_and_warn]
def set_action_choices(self):
field_action = self.fields.get("action")

Loading…
Cancel
Save