Project

General

Profile

« Previous | Next » 

Revision cad12da3

Added by Marc Dequènes over 14 years ago

  • ID cad12da3f8c4293d5ae6ec5869fa2a0bef1c0575

[fix] don't crash when modifying a relation with a blank item handle

View differences:

lib/ldap_shadows/elements/object.rb
raise PreProcessingError, _("The relation '%s' cannot be modified (read only)") % rel
end
if val.blank?
raise PreProcessingError, _("No item handle specified for relation '%s'") % rel
end
# fetch remote object in relation, which will be the real 'val'
foreign_item_list = rel_info[:foreign_klass].find(:all, val)
if foreign_item_list.empty?

Also available in: Unified diff