lib/ddr/models/solr_document.rb in ddr-models-3.0.0.beta.3 vs lib/ddr/models/solr_document.rb in ddr-models-3.0.0.beta.4

- old
+ new

@@ -88,11 +88,11 @@ def attached_files (get_json(Ddr::Index::Fields::ATTACHED_FILES) || {}).with_indifferent_access end def has_datastream?(dsID) - datastreams[dsID].present? + datastreams.key?(dsID) && datastreams[dsID]["size"].present? end def has_admin_policy? admin_policy_uri.present? end @@ -198,10 +198,10 @@ Ddr::Auth::EffectivePermissions.call(self, agents) end def research_help research_help_contact = self[Ddr::Index::Fields::RESEARCH_HELP_CONTACT] || inherited_research_help_contact - Ddr::Contacts.get(research_help_contact) if research_help_contact + Ddr::Models::Contact.call(research_help_contact) if research_help_contact end def parent_uri is_part_of || is_member_of_collection end