Skip to content

Commit 60efb41

Browse files
committed
Null check fix
1 parent 605c0f1 commit 60efb41

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Server/Core/Data/Sprocs.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,14 @@ public static DateTime GetLastEditTime(int packageId, string version, int locale
5050
{
5151
using (var context = DataContext.Instance())
5252
{
53-
return context.ExecuteScalar<DateTime>(System.Data.CommandType.StoredProcedure,
53+
var res = context.ExecuteScalar<object>(System.Data.CommandType.StoredProcedure,
5454
"Connect_LPM_GetLastEditTime",
5555
packageId, version, localeMain, localeSpecific);
56+
if (res == null)
57+
{
58+
return DateTime.MinValue;
59+
}
60+
return (DateTime)res;
5661
}
5762
}
5863

0 commit comments

Comments
 (0)