diff --git a/ResourceStatusSystem/Client/ResourceManagementClient.py b/ResourceStatusSystem/Client/ResourceManagementClient.py index 868436a26fa..d555c259bc6 100644 --- a/ResourceStatusSystem/Client/ResourceManagementClient.py +++ b/ResourceStatusSystem/Client/ResourceManagementClient.py @@ -791,6 +791,8 @@ def __addOrModifyElement( self, element, kwargs ): kwargs[ 'meta' ] = { 'onlyUniqueKeys' : True } sqlQuery = self._getElement( element, kwargs ) + if not sqlQuery[ 'OK' ]: + return sqlQuery del kwargs[ 'meta' ] diff --git a/ResourceStatusSystem/Client/ResourceStatusClient.py b/ResourceStatusSystem/Client/ResourceStatusClient.py index 5147daac180..233e3a8d338 100644 --- a/ResourceStatusSystem/Client/ResourceStatusClient.py +++ b/ResourceStatusSystem/Client/ResourceStatusClient.py @@ -2322,7 +2322,9 @@ def __addOrModifyElement( self, element, kwargs ): kwargs[ 'meta' ] = { 'onlyUniqueKeys' : True } sqlQuery = self._getElement( element, kwargs ) - + if not sqlQuery[ 'OK' ]: + return sqlQuery + del kwargs[ 'meta' ] if sqlQuery[ 'Value' ]: @@ -2380,6 +2382,8 @@ def __addOrModifyElementStatus( self, element, rDict ): } sqlQuery = self._getElement( 'ElementStatus', kwargs ) + if not sqlQuery[ 'OK' ]: + return sqlQuery rDict[ 'element' ] = element diff --git a/ResourceStatusSystem/Utilities/MySQLMonkey.py b/ResourceStatusSystem/Utilities/MySQLMonkey.py index 642cda2800e..5a1d98fea05 100644 --- a/ResourceStatusSystem/Utilities/MySQLMonkey.py +++ b/ResourceStatusSystem/Utilities/MySQLMonkey.py @@ -501,7 +501,7 @@ def _checkFLOAT(self, suspicious): if type(i) not in (int, float): raise RSSDBException( 'Non numeric value "%s"' % suspicious ) - return [ '"%s"' % s.replace( microsecond = 0 ) for s in suspicious ] + return suspicious _checkNUMERIC = _checkFLOAT _checkDECIMAL = _checkFLOAT