From 73130e77c75f8f8841aa6e29893384c393a203b4 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 29 Oct 2014 20:55:31 +0100 Subject: [PATCH] More BitId testing --- Logic/Support/Persistence.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Logic/Support/Persistence.cs b/Logic/Support/Persistence.cs index c6ffd2ab..3573fe6b 100644 --- a/Logic/Support/Persistence.cs +++ b/Logic/Support/Persistence.cs @@ -11,7 +11,17 @@ namespace Swarmops.Logic.Support { get { return SwarmDb.GetDatabaseForReading().GetKeyValue (key); } - set { SwarmDb.GetDatabaseForWriting().SetKeyValue (key, value); } + set + { + if (value == null) + { + SwarmDb.GetDatabaseForWriting().SetKeyValue(key, "-null-"); // TODO: Delete the key + } + else + { + SwarmDb.GetDatabaseForWriting().SetKeyValue(key, value); + } + } } public static Persistence Key