Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/backend/api/Services/ManagementFileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private void ValidateStatus(ManagementFileStatusTypes? currentManagementStatus,
}

// Not Editable -- Status must be updated first
if (!_managementStatusSolver.CanEditDetails(currentManagementStatus))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was throwing this error for admins too - preventing admins from changing back to an active state.
Should only prevent inactive state -> inactive state (for admins and non-admins).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic would be better in the solver itself

if (!_managementStatusSolver.CanEditDetails(currentManagementStatus) && !_managementStatusSolver.CanEditDetails(newManagementStatus))
{
throw new BusinessRuleViolationException("The file you are editing is not active, so you cannot save changes. Refresh your browser to see file state.");
}
Expand Down
Loading