mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
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:
@@ -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
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user