From 0fc0a808e81b7f514ad6e9bd4b44733d2096bac1 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Sun, 5 Sep 2010 20:29:47 +0000 Subject: [PATCH] Null values are supported in IncrementFieldValue --- Builder/IISMainHandler/build.txt | 2 +- Common/actions/IncrementFieldValue.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 63192f7..46be098 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -1124 \ No newline at end of file +1128 \ No newline at end of file diff --git a/Common/actions/IncrementFieldValue.cs b/Common/actions/IncrementFieldValue.cs index f7d8be2..81c7b9b 100644 --- a/Common/actions/IncrementFieldValue.cs +++ b/Common/actions/IncrementFieldValue.cs @@ -7,7 +7,10 @@ namespace FLocal.Common.actions { class IncrementFieldValue : AbstractFieldValue { public static Func INCREMENTOR_CUSTOM(int i) { - return s => (int.Parse(s)+i).ToString(); + return s => { + int old = String.IsNullOrEmpty(s) ? 0 : int.Parse(s); + return (old+i).ToString(); + }; } public static Func DECREMENTOR_CUSTOM(int i) {