diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs index b4a469fbd..bd4b383da 100644 --- a/src/Ombi.Store/Context/OmbiContext.cs +++ b/src/Ombi.Store/Context/OmbiContext.cs @@ -61,7 +61,7 @@ namespace Ombi.Store.Context using (var tran = Database.BeginTransaction()) { // Make sure we have the API User - var apiUserExists = Users.Any(x => x.UserName.Equals("Api", StringComparison.CurrentCultureIgnoreCase)); + var apiUserExists = Users.ToList().Any(x => x.UserName.Equals("Api", StringComparison.CurrentCultureIgnoreCase)); if (!apiUserExists) { Users.Add(new OmbiUser @@ -219,4 +219,4 @@ namespace Ombi.Store.Context } } } -} \ No newline at end of file +}