lib/treequel/branch.rb in treequel-1.5.1 vs lib/treequel/branch.rb in treequel-1.5.2
- old
+ new
@@ -804,11 +804,11 @@
### directory has a conversion rule, and return it.
def get_converted_object( attrsym )
value = self.entry ? self.entry[ attrsym.to_s ] : nil
if attribute = self.directory.schema.attribute_types[ attrsym ]
- syntax_oid = attribute.syntax.oid
+ syntax_oid = attribute.syntax_oid
if attribute.single?
value = self.directory.convert_to_object( syntax_oid, value.first ) if value
else
value = Array( value ).collect do |raw|
@@ -826,11 +826,11 @@
### Convert the specified +object+ according to the Branch's directory's conversion rules,
### and return it.
def get_converted_attribute( attrsym, object )
if attribute = self.directory.schema.attribute_types[ attrsym ]
self.log.debug "converting %p object (a %p) to a %p attribute" %
- [ attrsym, object.class, attribute.syntax.desc ]
- return self.directory.convert_to_attribute( attribute.syntax.oid, object )
+ [ attrsym, object.class, attribute.syntax_oid ]
+ return self.directory.convert_to_attribute( attribute.syntax_oid, object )
else
self.log.info "no attributeType for %p" % [ attrsym ]
return object.to_s
end
end