|
|
@ -123,7 +123,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Indexes |
|
|
{ |
|
|
{ |
|
|
var app = await grainFactory.GetGrain<IAppGrain>(appId).GetStateAsync(); |
|
|
var app = await grainFactory.GetGrain<IAppGrain>(appId).GetStateAsync(); |
|
|
|
|
|
|
|
|
if (IsFound(app.Value)) |
|
|
if (IsFound(app.Value, false)) |
|
|
{ |
|
|
{ |
|
|
return app.Value; |
|
|
return app.Value; |
|
|
} |
|
|
} |
|
|
@ -257,7 +257,7 @@ namespace Squidex.Domain.Apps.Entities.Apps.Indexes |
|
|
|
|
|
|
|
|
var app = await grainFactory.GetGrain<IAppGrain>(appId).GetStateAsync(); |
|
|
var app = await grainFactory.GetGrain<IAppGrain>(appId).GetStateAsync(); |
|
|
|
|
|
|
|
|
if (IsFound(app.Value)) |
|
|
if (IsFound(app.Value, true)) |
|
|
{ |
|
|
{ |
|
|
await Index().RemoveAsync(appId); |
|
|
await Index().RemoveAsync(appId); |
|
|
} |
|
|
} |
|
|
@ -268,9 +268,9 @@ namespace Squidex.Domain.Apps.Entities.Apps.Indexes |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static bool IsFound(IAppEntity app) |
|
|
private static bool IsFound(IAppEntity entity, bool allowArchived) |
|
|
{ |
|
|
{ |
|
|
return app.Version > EtagVersion.Empty && !app.IsArchived; |
|
|
return entity.Version > EtagVersion.Empty && (!entity.IsArchived || allowArchived); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private IAppsByNameIndexGrain Index() |
|
|
private IAppsByNameIndexGrain Index() |
|
|
|