-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete published record notifications and refactors
- Loading branch information
Ronald Krist
committed
Jan 27, 2025
1 parent
7afbe34
commit 279623c
Showing
17 changed files
with
314 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
oarepo_requests/notifications/builders/delete_published_record.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from ..generators import EntityRecipient | ||
from .oarepo import OARepoRequestActionNotificationBuilder | ||
|
||
|
||
class DeletePublishedRecordRequestSubmitNotificationBuilder( | ||
OARepoRequestActionNotificationBuilder | ||
): | ||
type = "delete-published-record-request-event.submit" | ||
|
||
recipients = [EntityRecipient(key="request.receiver")] # email only | ||
|
||
|
||
class DeletePublishedRecordRequestAcceptNotificationBuilder( | ||
OARepoRequestActionNotificationBuilder | ||
): | ||
type = "delete-published-record-request-event.accept" | ||
|
||
recipients = [EntityRecipient(key="request.created_by")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
from .oarepo import OARepoRequestActionNotificationBuilder | ||
|
||
from ..generators import EntityRecipient | ||
from .oarepo import OARepoRequestActionNotificationBuilder | ||
|
||
|
||
class PublishDraftRequestSubmitNotificationBuilder(OARepoRequestActionNotificationBuilder): | ||
class PublishDraftRequestSubmitNotificationBuilder( | ||
OARepoRequestActionNotificationBuilder | ||
): | ||
type = "publish-draft-request-event.submit" | ||
|
||
recipients = [ | ||
EntityRecipient(key="request.receiver") # email only | ||
] | ||
recipients = [EntityRecipient(key="request.receiver")] # email only | ||
|
||
|
||
class PublishDraftRequestAcceptNotificationBuilder(OARepoRequestActionNotificationBuilder): | ||
class PublishDraftRequestAcceptNotificationBuilder( | ||
OARepoRequestActionNotificationBuilder | ||
): | ||
type = "publish-draft-request-event.accept" | ||
|
||
recipients = [ | ||
EntityRecipient(key="request.created_by") | ||
] | ||
recipients = [EntityRecipient(key="request.created_by")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.