lib/pupa/models/concerns/identifiable.rb in pupa-0.0.10 vs lib/pupa/models/concerns/identifiable.rb in pupa-0.0.11

- old
+ new

@@ -16,11 +16,11 @@ # Sets the identifiers. # # @param [Array] identifiers a list of identifiers def identifiers=(identifiers) - @identifiers = IdentifierList.new(identifiers) + @identifiers = IdentifierList.new(symbolize_keys(identifiers)) end # Adds an issued identifier. # # @param [String] identifier an issued identifier, e.g. a DUNS number @@ -28,10 +28,10 @@ def add_identifier(identifier, scheme: nil) data = {identifier: identifier} if scheme data[:scheme] = scheme end - if identifier + if identifier.present? @identifiers << data end end end end