Skip to content

Commit

Permalink
Merge pull request #723 from Project-MONAI/AW-RevertClinicalReviewTas…
Browse files Browse the repository at this point in the history
…kModifications

Reverted changes for Workflow validation
  • Loading branch information
woodheadio authored Mar 29, 2023
2 parents 1a58c79 + e696eb1 commit 0833d1d
Show file tree
Hide file tree
Showing 6 changed files with 1,052 additions and 1,536 deletions.
11 changes: 0 additions & 11 deletions src/Shared/Shared/ValidationConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,13 @@ public static class ValidationConstants
/// </summary>
public static readonly string Mode = "mode";

/// <summary>
/// Key for the notifications.
/// </summary>
public static readonly string Notifications = "notifications";

public enum ModeValues
{
QA,
Research,
Clinical
}

public enum NotificationValues
{
True,
False
}

/// <summary>
/// Required arguments to run the clinical review task workflow args.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,16 +407,6 @@ private void ValidateClinicalReviewRequiredFields(TaskObject[] tasks, TaskObject
return;
}

if (!currentTask.Args.ContainsKey(Notifications))
{
Errors.Add($"Task: '{currentTask.Id}' notifications must be specified.");
return;
}
else if (!Enum.TryParse(typeof(NotificationValues), currentTask.Args[Notifications], true, out var _))
{
Errors.Add($"Task: '{currentTask.Id}' notifications is incorrectly specified{Comma}please specify 'true' or 'false'");
}

var reviewedTask = tasks.First(t => t.Id.ToLower() == currentTask.Args[ReviewedTaskId].ToLower());

if (reviewedTask.Type.Equals(ArgoTaskType, StringComparison.OrdinalIgnoreCase) is false)
Expand Down
Loading

0 comments on commit 0833d1d

Please sign in to comment.