Skip to content

Commit

Permalink
Add cardinality definition to DefaultWork.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsitu committed Aug 10, 2023
1 parent b36cae4 commit a4d9643
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/wings/active_fedora_converter/default_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ def options
foreign_key: :target }
end

{ predicate: predicate }
{ predicate: predicate , multiple: multiple? }
end

##
# @return [Boolean]
def multiple?
@key.respond_to?(:rule) && !(!@key.rule&.options&.dig(:args)&.include?(Array) && !@key.rule&.options&.dig(:args)&.include?(Set)) || true
end

##
Expand Down

0 comments on commit a4d9643

Please sign in to comment.