-
Notifications
You must be signed in to change notification settings - Fork 120
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
Grab the label from the file_set import URL #918
Conversation
May depend on samvera/browse-everything#167 (also WIP) |
447cec7
to
b48cc4b
Compare
@@ -39,7 +39,7 @@ def validate_files(files, env) | |||
# @return [TrueClass] | |||
def attach_files(files, env) | |||
return true unless files | |||
AttachFilesToWorkJob.perform_later(env.curation_concern, files) | |||
AttachFilesToWorkJob.perform_later(env.curation_concern, files, env.attributes.to_h.symbolize_keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new arg here does what line 43 of the AttachFilesActor
did. It makes sure that e.g. embargo attrs are available for FileSets in the actor stack.
@@ -31,10 +31,9 @@ def perform(file_set, operation) | |||
# on a machine that did not have this temp file on it's file system. | |||
# NOTE: The return status may be successful even if the content never attaches. | |||
if Hyrax::Actors::FileSetActor.new(file_set, user).create_content(f, 'original_file', false) | |||
# send message to user on download success | |||
Hyrax.config.callback.run(:after_import_url_success, file_set, user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't bother sending a notification if the import succeeded. User will already get notified when the FileSet is attached to the Work.
f6ef2f1
to
d144920
Compare
@jcoyne This is ready for review, good sir. |
Removes
AttachFilesActor
which has been subsumed byCreateWithFilesActor
andAttachFilesToWorkJob
.Fixes samvera/hyku#1021