From 30d2e48200838dc8723eca1d582e7112b885fb20 Mon Sep 17 00:00:00 2001 From: Dominion Date: Mon, 3 Apr 2023 01:49:44 -0400 Subject: [PATCH] Use more performant LINQ --- src/Tgstation.Server.Host/Database/DatabaseContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Database/DatabaseContext.cs b/src/Tgstation.Server.Host/Database/DatabaseContext.cs index b7a197143d..57159bdb32 100644 --- a/src/Tgstation.Server.Host/Database/DatabaseContext.cs +++ b/src/Tgstation.Server.Host/Database/DatabaseContext.cs @@ -298,7 +298,7 @@ namespace Tgstation.Server.Host.Database else logger.LogDebug("No migrations to apply"); - wasEmpty |= (await Users.AsQueryable().CountAsync(cancellationToken)) == 0; + wasEmpty |= !await Users.AsQueryable().AnyAsync(cancellationToken); return wasEmpty; }