Skip to content

Commit

Permalink
Revert "Fixed issue with saving content when having an empty variant.…
Browse files Browse the repository at this point in the history
… Aligned codebase with how it is in v8"

This reverts commit 5ae0b64.
  • Loading branch information
bergmania committed Aug 11, 2021
1 parent 805a228 commit c5752b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,14 @@ private async Task<ActionResult<ContentItemDisplay>> PostSaveInternal(ContentIte
v.Notifications.AddRange(n.Notifications);
}

//lastly, if it is not valid, add the model state to the outgoing object and throw a 400
HandleInvalidModelState(display, cultureForInvariantErrors);

//lastly, if it is not valid, add the model state to the outgoing object and throw a 400
if (!ModelState.IsValid)
{
return ValidationProblem(display, ModelState);
}

if (wasCancelled)
{
AddCancelMessage(display);
Expand Down

0 comments on commit c5752b5

Please sign in to comment.