Skip to content

Commit

Permalink
fixed type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Hasjanov authored and Oleg Hasjanov committed Feb 12, 2024
1 parent 2dfa9ac commit 1f5198e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def deposit

def recalculate_vat_rate
return unless payable?
return if billing_profile_id == billing_profile_id_was

self.vat_rate = assign_vat_rate

Expand Down
2 changes: 1 addition & 1 deletion app/models/phone_confirmation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class PhoneConfirmation
attr_reader :user

TIME_LIMIT = AuctionCenter::Application.config.customization[:mobile_sms_sent_time_limit_in_minutes] || 1.minutes
TIME_LIMIT = AuctionCenter::Application.config.customization[:mobile_sms_sent_time_limit_in_minutes].to_i.minutes || 1.minutes

def initialize(user)
@user = user
Expand Down
2 changes: 1 addition & 1 deletion app/views/phone_confirmations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<% end %>

<div class="u-container" data-controller='timeleft'
data-timeleft-date-value="<%= I18n.l(current_user.mobile_phone_confirmed_sms_send_at + PhoneConfirmation::TIME_LIMIT) %>"
data-timeleft-date-value="<%= I18n.l(current_user.mobile_phone_confirmed_sms_send_at.present? ? current_user.mobile_phone_confirmed_sms_send_at + PhoneConfirmation::TIME_LIMIT) : Time.zone.now %>"
data-timeleft-refresh-interval-value="500" data-timeleft-message-timer-value="<%= I18n.t('phone_confirmations.new.send_again') %>"
data-timeleft-default-message-timer-value="<%= I18n.t('phone_confirmations.new.send_code') %>">
<div class="u-container margin-block">
Expand Down

0 comments on commit 1f5198e

Please sign in to comment.