From 454ff5b3ed30eb47c4899c246355b6df6e9f1d47 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 27 Oct 2014 09:59:09 +0100 Subject: [PATCH] Compatibility with Postgresql 9.4 --- yavscModel/RolesAndMemebers/Profile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yavscModel/RolesAndMemebers/Profile.cs b/yavscModel/RolesAndMemebers/Profile.cs index c466d35c..68a56652 100644 --- a/yavscModel/RolesAndMemebers/Profile.cs +++ b/yavscModel/RolesAndMemebers/Profile.cs @@ -104,7 +104,7 @@ namespace Yavsc.Model.RolesAndMembers public Profile (ProfileBase profile) { object b = profile.GetPropertyValue ("BlogVisible"); - BlogVisible = (b == null) ? true : (bool)b; + BlogVisible = (b == null) ? true : (b is DBNull)? true : (bool)b; object s = profile.GetPropertyValue ("BlogTitle"); BlogTitle = (s is DBNull) ? null : (string)s; @@ -152,7 +152,7 @@ namespace Yavsc.Model.RolesAndMembers this.AccountNumber = (s is DBNull) ? null : (string)s; s = profile.GetPropertyValue ("BankedKey"); - BankedKey = (s == null) ? 0 : (int)s; + BankedKey = (s == null) ? 0 : (s is DBNull)? 0 : (int)s; } }