From beba64242d6c752c9ea7b08047ac844ab790a188 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 8 Jun 2017 22:54:13 +0200 Subject: [PATCH] DB bug fix. --- Config/FluentCommon.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Config/FluentCommon.cs b/Config/FluentCommon.cs index f231cef3f..61430b540 100644 --- a/Config/FluentCommon.cs +++ b/Config/FluentCommon.cs @@ -131,9 +131,15 @@ namespace Config { using (var transaction = session.BeginTransaction()) { - session.SaveOrUpdate(obj); - try { transaction.Commit(); } - catch { } + try + { + session.SaveOrUpdate(obj); + transaction.Commit(); + } + catch + { + transaction.Rollback(); + } } }