diff --git a/app/controllers/concerns/english_offers/offerable.rb b/app/controllers/concerns/english_offers/offerable.rb index 331ae1082..fe9fbf385 100644 --- a/app/controllers/concerns/english_offers/offerable.rb +++ b/app/controllers/concerns/english_offers/offerable.rb @@ -30,12 +30,17 @@ def inform_about_invalid_bid_amount end def find_or_initialize_autobidder - @autobider = current_user&.autobiders&.find_or_initialize_by(domain_name: @offer.auction.domain_name) + auction = Auction.find_by(uuid: params[:auction_uuid]) + auction = @offer.auction if auction.nil? + + @autobider = current_user&.autobiders&.find_or_initialize_by(domain_name: auction.domain_name) end # rubocop:disable Metrics/AbcSize def prevent_check_for_invalid_bid - auction = Auction.with_user_offers(current_user.id).find_by(uuid: @offer.auction.uuid) + auction_uuid = params[:auction_uuid].presence || @offer.auction.uuid + + auction = Auction.with_user_offers(current_user.id).find_by(uuid: auction_uuid) return unless bid_is_bad?(auction:, update_params:) flash[:alert] = I18n.t('english_offers.show.bid_failed', price: auction_highest_prrice_message(auction)) diff --git a/app/views/phone_confirmations/_form.html.erb b/app/views/phone_confirmations/_form.html.erb index 8b3efe1e2..27f96d3c5 100644 --- a/app/views/phone_confirmations/_form.html.erb +++ b/app/views/phone_confirmations/_form.html.erb @@ -7,7 +7,7 @@ <%= component 'common/form/text_field', form: f, attribute: :confirmation_code %> -