Skip to content

Commit 994244e

Browse files
committed
Adding fix to session seralizer not recoginizing GUIDs
1 parent 119c16a commit 994244e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

TelegramBotBase/Tools/Conversion.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,16 @@ public static void CustomConversionChecks(FormBase form, KeyValuePair<string, ob
2828
f.SetValue(form, d);
2929
}
3030
}
31+
32+
//Newtonsoft Guid converter issue
33+
if (f.PropertyType == typeof(Guid))
34+
{
35+
Guid g;
36+
if (Guid.TryParse(p.Value.ToString(), out g))
37+
{
38+
f.SetValue(form, g);
39+
}
40+
41+
}
3142
}
3243
}

0 commit comments

Comments
 (0)