Add error handling for future schedule conflicts and media asset usage
Introduced new error types for handling conflicts when attempting to delete shows or media assets that are currently scheduled or in use. Updated the DeleteShowCommandHandler and DeleteMediaAssetCommandHandler to check for these conditions and return appropriate error responses. This enhances the robustness of the application by preventing unintended deletions and improving user feedback.
This commit is contained in:
@@ -16,6 +16,11 @@ public static class GroupErrors
|
||||
"Шоу или коллекция не найдены."
|
||||
);
|
||||
|
||||
public static readonly Error InUse = Error.Conflict(
|
||||
"Groups.InUse",
|
||||
"Группа используется в сетке: на неё ссылается слот, врезка стыка или запасная группа шаблона."
|
||||
);
|
||||
|
||||
public static readonly Error FilterNotSet = Error.Validation(
|
||||
"Groups.FilterNotSet",
|
||||
"У группы не задано правило набора."
|
||||
|
||||
Reference in New Issue
Block a user