Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated creators when registering new workflow versions #2064

Open
fbacall opened this issue Nov 13, 2024 · 0 comments
Open

Duplicated creators when registering new workflow versions #2064

fbacall opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@fbacall
Copy link
Contributor

fbacall commented Nov 13, 2024

In the workflow metadata extractors we use assets_creators_attributes to add creators, which will only ever add new creators, it won't remove or updating existing ones:

mani = manifest
metadata[:title] = mani['name'] if mani.has_key?('name')
metadata[:description] = mani['description'] if mani.has_key?('description')
if mani['author'].present?
mani['author'].split(',').each_with_index do |author_name, i|
author = extract_author(author_name)
unless author.blank?
metadata[:assets_creators_attributes] ||= {}
metadata[:assets_creators_attributes][i.to_s] = author.merge(pos: i)
end
end
end

So every time a new version of a workflow is added (when scraping, for example), it will keep adding to the list.

@fbacall fbacall self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant