events: fix destination_group_obj not being nullable (#22161)

* events: fix `destination_group_obj` not being nullable

* `make lint-fix`
This commit is contained in:
Simonyi Gergő
2026-05-08 17:16:20 +02:00
committed by GitHub
parent 9f613a3337
commit e220d8e29b
3 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ from authentik.events.models import NotificationRule
class NotificationRuleSerializer(ModelSerializer):
"""NotificationRule Serializer"""
destination_group_obj = GroupSerializer(read_only=True, source="destination_group")
destination_group_obj = GroupSerializer(
read_only=True, source="destination_group", required=False, allow_null=True
)
class Meta:
model = NotificationRule
+1 -1
View File
@@ -58,7 +58,7 @@ export interface NotificationRule {
* @type {Group}
* @memberof NotificationRule
*/
readonly destinationGroupObj: Group;
readonly destinationGroupObj: Group | null;
/**
* When enabled, notification will be sent to user the user that triggered the event.When destination_group is configured, notification is sent to both.
* @type {boolean}
+1
View File
@@ -43829,6 +43829,7 @@ components:
allOf:
- $ref: '#/components/schemas/Group'
readOnly: true
nullable: true
destination_event_user:
type: boolean
description: When enabled, notification will be sent to user the user that