impworks / bonsai

Self-hosted family wiki engine / photoalbum
MIT License
202 stars 25 forks source link

ошибка при удаление #252

Closed centralhardware closed 10 months ago

centralhardware commented 10 months ago
System.InvalidOperationException: Sequence contains more than one matching element
2023-12-05T19:14:48.240618110Z    at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
2023-12-05T19:14:48.240622007Z    at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
2023-12-05T19:14:48.240626006Z    at Microsoft.EntityFrameworkCore.Query.ReplacingExpressionVisitor.VisitMember(MemberExpression memberExpression)
2023-12-05T19:14:48.240630147Z    at System.Linq.Expressions.ExpressionVisitor.VisitBinary(BinaryExpression node)
2023-12-05T19:14:48.240634280Z    at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.ProcessLambdaExpression(NavigationExpansionExpression source, LambdaExpression lambdaExpression)
2023-12-05T19:14:48.240638230Z    at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.ProcessWhere(NavigationExpansionExpression source, LambdaExpression predicate)
2023-12-05T19:14:48.240642001Z    at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.ProcessFirstSingleLastOrDefault(NavigationExpansionExpression source, MethodInfo genericMethod, LambdaExpression predicate, Type returnType)
2023-12-05T19:14:48.240646903Z    at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
2023-12-05T19:14:48.240650753Z    at Microsoft.EntityFrameworkCore.Query.Internal.NavigationExpandingExpressionVisitor.Expand(Expression query)
2023-12-05T19:14:48.240654356Z    at Microsoft.EntityFrameworkCore.Query.QueryTranslationPreprocessor.Process(Expression query)
2023-12-05T19:14:48.240657983Z    at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
2023-12-05T19:14:48.240661591Z    at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
2023-12-05T19:14:48.240665212Z    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
2023-12-05T19:14:48.240668896Z    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0`1.<ExecuteAsync>b__0()
2023-12-05T19:14:48.240673564Z    at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
2023-12-05T19:14:48.240677310Z    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
2023-12-05T19:14:48.240681067Z    at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ExecuteAsync[TSource,TResult](MethodInfo operatorMethodInfo, IQueryable`1 source, Expression expression, CancellationToken cancellationToken)
2023-12-05T19:14:48.240684875Z    at Bonsai.Code.Utils.Helpers.QueryableExtensions.GetAsync[T](IQueryable`1 source, Expression`1 predicate, String error)
2023-12-05T19:14:48.240698216Z    at Bonsai.Areas.Admin.Logic.PagesManagerService.RequestRemoveAsync(Guid id, ClaimsPrincipal principal) in /build/Bonsai/Areas/Admin/Logic/PagesManagerService.cs:line 259
2023-12-05T19:14:48.240703282Z    at Bonsai.Areas.Admin.Controllers.PagesController.Remove(Guid id) in /build/Bonsai/Areas/Admin/Controllers/PagesController.cs:line 156
2023-12-05T19:14:48.240707055Z    at lambda_method2006(Closure, Object)
2023-12-05T19:14:48.240710535Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
2023-12-05T19:14:48.240714404Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
2023-12-05T19:14:48.240718297Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-12-05T19:14:48.240722235Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
2023-12-05T19:14:48.240725850Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2023-12-05T19:14:48.240729913Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
2023-12-05T19:14:48.240734074Z --- End of stack trace from previous location ---
2023-12-05T19:14:48.240738453Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-12-05T19:14:48.240742548Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
2023-12-05T19:14:48.240746215Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2023-12-05T19:14:48.240750100Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
2023-12-05T19:14:48.240753711Z --- End of stack trace from previous location ---
2023-12-05T19:14:48.240757135Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
2023-12-05T19:14:48.240760913Z    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
2023-12-05T19:14:48.240764706Z    at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240768254Z    at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240771754Z    at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240779617Z    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240783330Z    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240786935Z    at Bonsai.Code.Services.StartupService.RenderLoadingPage(HttpContext context, Func`1 nextDelegate) in /build/Bonsai/Code/Services/StartupService.cs:line 81
2023-12-05T19:14:48.240790624Z    at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
2023-12-05T19:14:48.240794239Z    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
image image

пытаюсь удалить страницу "тест 1"

centralhardware commented 10 months ago

полностью пустая страница то же не удаляется