diff --git a/Src/TournamentCalender.Data/GenericRepository.cs b/Src/TournamentCalender.Data/GenericRepository.cs index f3932d5..e6e36bf 100644 --- a/Src/TournamentCalender.Data/GenericRepository.cs +++ b/Src/TournamentCalender.Data/GenericRepository.cs @@ -38,7 +38,7 @@ public virtual async Task Delete(T registration, CancellationToken canc return false; // only save date if not already approved - if (!(entity.Fields[field.Name].CurrentValue is DateTime approvedDateValue)) + if (!(entity.Fields[field.Name].CurrentValue is DateTime)) { entity.SetNewFieldValue(field.Name, date); return da.SaveEntity(entity, true);