diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs index 80b54f6e2e..160621eb65 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs @@ -429,9 +429,18 @@ SELECT 4 AS [Key], COUNT(id) AS [Value] FROM umbracoUser WHERE userDisabled = 0 .From() .WhereIn(x => x.UserGroupId, groupIds); - var groups2languages = Database.Fetch(sql) - .GroupBy(x => x.UserGroupId) - .ToDictionary(x => x.Key, x => x); + Dictionary> groups2languages; + try + { + groups2languages = Database.Fetch(sql) + .GroupBy(x => x.UserGroupId) + .ToDictionary(x => x.Key, x => x); + } + catch + { + // If we get an error, the table has not been made in the database yet, set the list to an empty one + groups2languages = new Dictionary>(); + } // map groups