[checkmk-commits] Check_MK Git: check_mk: fixed exception when imported_folder attribute was set to None

Andreas Boesl ab at mathias-kettner.de
Thu Feb 12 14:33:58 CET 2015


Module: check_mk
Branch: master
Commit: abb94ee8fdf850f7de2826e15d96f59f6654bdc1
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=abb94ee8fdf850f7de2826e15d96f59f6654bdc1

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Thu Feb 12 14:33:37 2015 +0100

fixed exception when imported_folder attribute was set to None

---

 web/htdocs/wato.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 41556b7..84b7337 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5658,7 +5658,7 @@ class TextAttribute(Attribute):
         if self._mandatory and not value:
             raise MKUserError("attr_" + self.name(),
                   _("Please specify a value for %s") % self.title())
-        if value.strip() == "" and not self._allow_empty:
+        if not self._allow_empty and value.strip() == "":
             raise MKUserError("attr_" + self.name(),
                   _("%s may be missing, if must not be empty if it is set.") % self.title())
 



More information about the checkmk-commits mailing list