diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 00:32:17 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 00:32:17 +0200 |
| commit | e7d5d0b2c32b172ecdaa80555bf5804043fd87a0 (patch) | |
| tree | 94131b781b2a93c693af73b1cd224dc259b112f8 /app/models/node.rb | |
| parent | 1bebea4f50f73a39140be862b10f2dbf4a4da1f5 (diff) | |
Fix I18n::InvalidLocale :root errors
- Fix Page.find(self.head) → self.head in node.rb wipe_draft!
- Migration to delete 407 spurious 'root' locale records from
page_translations (Globalize artefact, all had nil titles and
duplicate de/en translations existed for all affected pages)
Diffstat (limited to 'app/models/node.rb')
| -rw-r--r-- | app/models/node.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/node.rb b/app/models/node.rb index a3ef23a..59a9d7c 100644 --- a/app/models/node.rb +++ b/app/models/node.rb | |||
| @@ -137,7 +137,7 @@ class Node < ApplicationRecord | |||
| 137 | end | 137 | end |
| 138 | return unless self.head | 138 | return unless self.head |
| 139 | return unless self.draft.updated_at < 1.day.ago | 139 | return unless self.draft.updated_at < 1.day.ago |
| 140 | return if Page.find(self.head).has_changes_to? self.draft | 140 | return if self.head.has_changes_to? self.draft |
| 141 | 141 | ||
| 142 | self.draft.destroy | 142 | self.draft.destroy |
| 143 | self.draft_id = nil | 143 | self.draft_id = nil |
