Fix shareable links association on user model [SCI-9200] (#6114)

This commit is contained in:
Alex Kriuchykhin 2023-08-31 11:48:35 +02:00 committed by GitHub
parent 0afe1d2946
commit d63ec9f927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,10 @@ class User < ApplicationRecord
foreign_key: 'last_modified_by_id',
inverse_of: :last_modified_by,
dependent: :nullify
has_many :shareable_links, inverse_of: :created_by, dependent: :destroy
has_many :shareable_links,
foreign_key: 'created_by_id',
inverse_of: :created_by,
dependent: :destroy
has_many :user_notifications, inverse_of: :user
has_many :notifications, through: :user_notifications