about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-06-12 18:12:29 -0500
committerGitHub <noreply@github.com>2018-06-12 18:12:29 -0500
commitf6bb50b6ece555af138df164680189b1ec57da4b (patch)
tree490c6054260f4a75fb0467f343124746c1935970 /app/models
parent34f1fd2a621ca869c17009487e2f10063812fbd0 (diff)
parentfac6e392e9d76e3cca44ce142690a59afc0a9156 (diff)
Merge pull request #539 from glitch-soc/merge-upstream
Merge upstream
Diffstat (limited to 'app/models')
-rw-r--r--app/models/web/push_subscription.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb
index 867bc9519..d19b20c48 100644
--- a/app/models/web/push_subscription.rb
+++ b/app/models/web/push_subscription.rb
@@ -18,7 +18,7 @@ class Web::PushSubscription < ApplicationRecord
   belongs_to :user, optional: true
   belongs_to :access_token, class_name: 'Doorkeeper::AccessToken', optional: true
 
-  has_one :session_activation
+  has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription
 
   def push(notification)
     I18n.with_locale(associated_user&.locale || I18n.default_locale) do