Skip unverified institution flag for unknown institutions

Filter out empty, "Unknown", and "Unknown Institution" values
from generating verification flags since there's nothing to verify.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-20 23:42:10 +01:00
parent 894b539002
commit b3d45c12d1

View File

@@ -385,7 +385,11 @@ public sealed class ProcessCVCheckJob
} }
// Penalty for unverified education (not recognised, but not flagged as fake) // Penalty for unverified education (not recognised, but not flagged as fake)
foreach (var edu in educationResults.Where(e => !e.IsVerified && !e.IsDiplomaMill && !e.IsSuspicious && e.Status == "Unknown")) // Skip unknown/empty institutions as there's nothing to verify
foreach (var edu in educationResults.Where(e => !e.IsVerified && !e.IsDiplomaMill && !e.IsSuspicious && e.Status == "Unknown"
&& !string.IsNullOrWhiteSpace(e.ClaimedInstitution)
&& !e.ClaimedInstitution.Equals("Unknown Institution", StringComparison.OrdinalIgnoreCase)
&& !e.ClaimedInstitution.Equals("Unknown", StringComparison.OrdinalIgnoreCase)))
{ {
score -= UnverifiedEducationPenalty; score -= UnverifiedEducationPenalty;