403b09
From 2ee7cd65c678f310154775d69bc0d044b8ad881a Mon Sep 17 00:00:00 2001
403b09
From: David Kupka <dkupka@redhat.com>
403b09
Date: Thu, 4 Aug 2016 16:02:24 +0200
403b09
Subject: [PATCH] schema cache: Do not reset ServerInfo dirty flag
403b09
403b09
Once dirty flag is set to True it must not be set back to False.
403b09
Otherwise changes are not written back to file.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6048
403b09
403b09
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
403b09
---
403b09
 ipaclient/remote_plugins/schema.py | 3 ++-
403b09
 1 file changed, 2 insertions(+), 1 deletion(-)
403b09
403b09
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
403b09
index 5264d4cc177ba457c517f93f203e0baca7b0ac01..b49ccbb7f7905e2561598d66beca6d8b1d5ed48e 100644
403b09
--- a/ipaclient/remote_plugins/schema.py
403b09
+++ b/ipaclient/remote_plugins/schema.py
403b09
@@ -401,7 +401,8 @@ class ServerInfo(collections.MutableMapping):
403b09
         return self._dict[key]
403b09
 
403b09
     def __setitem__(self, key, value):
403b09
-        self._dirty = key not in self._dict or self._dict[key] != value
403b09
+        if key not in self._dict or self._dict[key] != value:
403b09
+            self._dirty = True
403b09
         self._dict[key] = value
403b09
 
403b09
     def __delitem__(self, key):
403b09
-- 
403b09
2.7.4
403b09