An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Folder: Explicitly nullify associated cipher folder_id when deleting

Fixes #111

+4 -1
+4 -1
lib/folder.rb
··· 21 21 before_create :generate_uuid_primary_key 22 22 23 23 belongs_to :user, foreign_key: :user_uuid, inverse_of: :folders 24 - has_many :ciphers, foreign_key: :folder_uuid, inverse_of: :folder 24 + has_many :ciphers, 25 + foreign_key: :folder_uuid, 26 + inverse_of: :folder, 27 + dependent: :nullify 25 28 26 29 def to_hash 27 30 {