mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
895733f534
commit
0a7b2e34b8
1 file changed
+3
-2
+3
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user