Skip to content

Commit

Permalink
Use user_key instead of email in contribute controller
Browse files Browse the repository at this point in the history
  • Loading branch information
bess committed Dec 18, 2017
1 parent caaebb9 commit 67da034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/forms/contribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def tufts_pdf
internal_note: note
)
copy_attributes
user = User.find_by(email: @depositor)
user = ::User.find_by_user_key(@depositor)
current_ability = ::Ability.new(user)
uploaded_file = Hyrax::UploadedFile.create(user: user, file: @attachment)
attributes = { uploaded_files: [uploaded_file.id] }
Expand Down
2 changes: 1 addition & 1 deletion app/models/forms/generic_tisch_deposit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def tufts_pdf
internal_note: note
)
copy_attributes
user = User.find_by(email: @depositor)
user = ::User.find_by_user_key(@depositor)
current_ability = ::Ability.new(user)
uploaded_file = Hyrax::UploadedFile.create(user: user, file: @attachment)
attributes = { uploaded_files: [uploaded_file.id] }
Expand Down

0 comments on commit 67da034

Please sign in to comment.