Skip to content

Commit

Permalink
use correct field name #526
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed May 21, 2020
1 parent 5339496 commit 3cb8c87
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/clients_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def destroy
status = 400
Rails.logger.warn message
render json: { errors: [{ status: status.to_s, title: message }] }.to_json, status: status
elsif @client.update(is_active: nil, deleted_at: Time.zone.now)
elsif @client.update(is_active: false, deleted_at: Time.zone.now)
@client.send_delete_email(responsible_id: current_user.uid) unless Rails.env.test?
head :no_content
else
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def destroy
status = 400
Rails.logger.warn message
render json: { errors: [{ status: status.to_s, title: message }] }.to_json, status: status
elsif @provider.update_attributes(is_active: nil, deleted_at: Time.zone.now)
elsif @provider.update_attributes(is_active: false, deleted_at: Time.zone.now)
@provider.send_delete_email(responsible_id: current_user.uid) unless Rails.env.test?
head :no_content
else
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def destroy
status = 400
Rails.logger.warn message
render json: { errors: [{ status: status.to_s, title: message }] }.to_json, status: status
elsif @client.update_attributes(is_active: nil, deleted_at: Time.zone.now)
elsif @client.update_attributes(is_active: false, deleted_at: Time.zone.now)
@client.send_delete_email unless Rails.env.test?
head :no_content
else
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/helpable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def register_url

if [200, 201].include?(response.status)
# update minted column after first successful registration in handle system
self.update_attributes(minted: Time.zone.now, updated: Time.zone.now) if minted.blank?
self.update_attributes(minted: Time.zone.now, updated_at: Time.zone.now) if minted.blank?
Rails.logger.info "[Handle] URL for DOI " + doi + " updated to " + url + "." unless Rails.env.test?

self.__elasticsearch__.index_document
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/client.rake
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace :client do
Rake::Task["prefix:delete"].invoke
end

if client.update_attributes(is_active: nil, deleted_at: Time.zone.now)
if client.update_attributes(is_active: false, deleted_at: Time.zone.now)
client.send_delete_email(responsible_id: "admin") unless Rails.env.test?
puts "Client with client ID #{ENV['CLIENT_ID']} deleted."
else
Expand Down

0 comments on commit 3cb8c87

Please sign in to comment.