Merge from trunk
[plcapi.git] / PLC / SliceAttributeTypes.py
index 65ec0fa..5884fe0 100644 (file)
@@ -20,7 +20,6 @@ class SliceAttributeType(Row):
         'name': Parameter(str, "Slice attribute type name", max = 100),
         'description': Parameter(str, "Slice attribute type description", max = 254),
         'min_role_id': Parameter(int, "Minimum (least powerful) role that can set or change this attribute"),
-        'peer_id': Parameter(int, "Peer at which this node is managed", nullok = True),
         }
 
     # for Cache
@@ -65,9 +64,9 @@ class SliceAttributeTypes(Table):
                 ints = filter(lambda x: isinstance(x, (int, long)), attribute_type_filter)
                 strs = filter(lambda x: isinstance(x, StringTypes), attribute_type_filter)
                 attribute_type_filter = Filter(SliceAttributeType.fields, {'attribute_type_id': ints, 'name': strs})
-                sql += " AND (%s)" % attribute_type_filter.sql(api, "OR")
+                sql += " AND (%s) %s" % attribute_type_filter.sql(api, "OR")
             elif isinstance(attribute_type_filter, dict):
                 attribute_type_filter = Filter(SliceAttributeType.fields, attribute_type_filter)
-                sql += " AND (%s)" % attribute_type_filter.sql(api, "AND")
+                sql += " AND (%s) %s" % attribute_type_filter.sql(api, "AND")
 
         self.selectall(sql)