From 0a7b2e34b8c38d71903fd29ae578deebfc26548b Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Wed, 4 Nov 2026 10:07:54 -0500 Subject: [PATCH] Fix the settings page before QuickBooks is connected The token expiry came back as "never synced" text, which the page treated as a time, so it failed. It's now empty, shown as N/A. Co-Authored-By: Claude Opus 5.5 --- app/models/qbo.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/qbo.rb b/app/models/qbo.rb index f08682d..be568e0 100644 --- a/app/models/qbo.rb +++ b/app/models/qbo.rb @@ -23,16 +23,17 @@ class Qbo < ActiveRecord::Base return I18n.t(:label_qbo_never_synced) end + # Token expiry times, or nil when QuickBooks isn't connected (the settings page shows N/A) def self.oauth2_access_token_expires_at QboConnectionService.current!.oauth2_access_token_expires_at rescue - return I18n.t(:label_qbo_never_synced) + nil end def self.oauth2_refresh_token_expires_at QboConnectionService.current!.oauth2_refresh_token_expires_at rescue - return I18n.t(:label_qbo_never_synced) + nil end # Updates last sync time stamp