Code

Updated filtering for device item dialog
[gosa.git] / gosa-si / contrib / 90_gosa.conf
index 81eade305a8a7bab491194864d06a2e58fa72aa5..72ae8b088c717a075ebaadfacd0a33c0e2b14265 100644 (file)
@@ -73,7 +73,8 @@ def getFullProductHostInformation_list(self, objectId=None, installationStatus=N
         productIds= self.getProductIds_list(type, None, installationStatus)
         
         # Load product states
-        productStates= self.getProductStates_hash(objectId)
+        if objectId != None:
+            productStates= self.getProductStates_hash(objectId)
 
         # Extend every entry by name and description
         for productId in productIds:
@@ -85,10 +86,16 @@ def getFullProductHostInformation_list(self, objectId=None, installationStatus=N
 
             # Find product entry
             currentState= None
-            for state in productStates[objectId]:
-                if state['productId'] == productId:
-                    currentState= state
-                    break
+            if objectId != None:
+                for state in productStates[objectId]:
+                    if state['productId'] == productId:
+                        currentState= state
+                        break
+            else:
+                state = {}
+                state['installationStatus'] = "not_installed"
+                state['actionRequest'] = "none"
+                currentState= state
 
             # Add missing information to the productInfo
             if currentState['installationStatus'] != "not_installed" or \