Added protection against user destroying loc inadvertently

This commit is contained in:
Rick Falkvinge
2016-01-17 21:48:35 +01:00
parent fa5f7a2ab7
commit a31671e2fb
+5 -2
View File
@@ -395,8 +395,11 @@ namespace Swarmops.Logic.Financial
// This is ok and can be thrown if OpenedYear throws because there are no transactions yet.
}
SwarmDb.GetDatabaseForWriting().SetFinancialAccountName (Identity, value);
base.Name = value;
if (value != Name) // check that we're not setting value to the localized version, thereby destroying loc for other users
{
SwarmDb.GetDatabaseForWriting().SetFinancialAccountName (Identity, value);
base.Name = value;
}
}
}