lib/ddr/models/solr_document.rb in ddr-models-1.15.0 vs lib/ddr/models/solr_document.rb in ddr-models-1.16.0

- old
+ new

@@ -88,11 +88,11 @@ end def admin_policy if admin_policy_pid query = ActiveFedora::SolrService.construct_query_for_pids([admin_policy_pid]) - self.class.new(ActiveFedora::SolrService.query(query)) + self.class.new(ActiveFedora::SolrService.query(query).first) end end def has_children? ActiveFedora::SolrService.class_from_solr_document(self).reflect_on_association(:children).present? @@ -226,10 +226,10 @@ def get_date(field) parse_date(get(field)) end def get_json(field) - JSON.parse(self[field].first) + JSON.parse Array(self[field]).first end def parse_date(date) Time.parse(date).localtime if date end