Fix slice tags
[plcapi.git] / PLC / TagTypes.py
index 78cc56f..30553e7 100644 (file)
@@ -48,7 +48,7 @@ class TagType (AlchemyObj):
         if insert == True or 'tag_type_id' not in self:
             AlchemyObj.insert(self, dict(self))
             tag_type = AlchemyObj.select(self, filter={'tagname': self['tagname']})
-            self['tag_type_id'] = tag_type['tag_type_id']
+            self['tag_type_id'] = tag_type.tag_type_id
         else:
             AlchemyObj.update(self, dict(self))