fix sqlite remove template

This commit is contained in:
Pete Matsyburka
2025-06-30 11:44:55 +03:00
parent 10e4476f4a
commit d0ac4ad222
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class Template < ApplicationRecord
belongs_to :account
belongs_to :folder, class_name: 'TemplateFolder'
has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy
has_one :search_entry, as: :record, inverse_of: :record, dependent: :destroy if SearchEntry.table_exists?
before_validation :maybe_set_default_folder, on: :create