Skip to content

Commit ce23f14

Browse files
committed
- Fixed an issue where TV Applications could not be deleted via the TV Application List block.
1 parent 58da05d commit ce23f14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Rock.Blocks/Tv/TvApplicationList.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,6 @@ public BlockActionResult Delete( string key )
194194
return ActionBadRequest( $"Not authorized to delete {Site.FriendlyTypeName}." );
195195
}
196196

197-
if ( !entityService.CanDelete( entity, out var errorMessage ) )
198-
{
199-
return ActionBadRequest( errorMessage );
200-
}
201-
202197
var sitePages = new List<int> {
203198
entity.DefaultPageId ?? -1,
204199
entity.LoginPageId ?? -1,
@@ -227,6 +222,11 @@ public BlockActionResult Delete( string key )
227222

228223
RockContext.SaveChanges( true );
229224

225+
if ( !entityService.CanDelete( entity, out var errorMessage ) )
226+
{
227+
return ActionBadRequest( errorMessage );
228+
}
229+
230230
entityService.Delete( entity );
231231
RockContext.SaveChanges();
232232

0 commit comments

Comments
 (0)