diff --git a/src/Squidex.Domain.Apps.Entities/AppProvider.cs b/src/Squidex.Domain.Apps.Entities/AppProvider.cs index 55c030912..e6772c77b 100644 --- a/src/Squidex.Domain.Apps.Entities/AppProvider.cs +++ b/src/Squidex.Domain.Apps.Entities/AppProvider.cs @@ -63,6 +63,11 @@ namespace Squidex.Domain.Apps.Entities { var appId = await GetAppIdAsync(appName); + if (appId == Guid.Empty) + { + return null; + } + var app = await stateFactory.GetSingleAsync(appId); return IsNotFound(app) ? null : app.State; @@ -72,6 +77,11 @@ namespace Squidex.Domain.Apps.Entities { var schemaId = await GetSchemaIdAsync(appId, name); + if (schemaId == Guid.Empty) + { + return null; + } + var schema = await stateFactory.GetSingleAsync(schemaId); return IsNotFound(provideDeleted, schema) ? null : schema.State;