Merge pull request #7018 from tchak/migration-dossiers-deleted-scopes-fix

fix(migration): add with_discarded to seed_hidden_at_dossiers
This commit is contained in:
LeSim 2022-03-09 18:00:24 +01:00 committed by GitHub
commit aaebcf7121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ namespace :after_party do
puts "Running deploy task 'seed_hidden_at_dossiers'"
Dossier
.with_discarded
.where.not(hidden_at: nil)
.where(hidden_by_user_at: nil, hidden_by_administration_at: nil)
.update_all('hidden_by_user_at = hidden_at, hidden_by_administration_at = hidden_at')