diff options
Diffstat (limited to 'app/models/session_activation.rb')
-rw-r--r-- | app/models/session_activation.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/session_activation.rb b/app/models/session_activation.rb index 1d4ebca02..d364f03df 100644 --- a/app/models/session_activation.rb +++ b/app/models/session_activation.rb @@ -15,9 +15,9 @@ # class SessionActivation < ApplicationRecord - belongs_to :user, inverse_of: :session_activations, required: true - belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', dependent: :destroy - belongs_to :web_push_subscription, class_name: 'Web::PushSubscription', dependent: :destroy + belongs_to :user, inverse_of: :session_activations + belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', dependent: :destroy, optional: true + belongs_to :web_push_subscription, class_name: 'Web::PushSubscription', dependent: :destroy, optional: true delegate :token, to: :access_token, |