Remove unused columns
This commit is contained in:
parent
3ac4a1b339
commit
371d612fdb
5 changed files with 16 additions and 16 deletions
|
@ -14,6 +14,8 @@
|
|||
# procedure_id :integer
|
||||
#
|
||||
class AssignTo < ApplicationRecord
|
||||
self.ignored_columns = [:procedure_id]
|
||||
|
||||
belongs_to :instructeur, optional: false
|
||||
belongs_to :groupe_instructeur, optional: false
|
||||
has_one :procedure_presentation, dependent: :destroy
|
||||
|
|
|
@ -9,13 +9,11 @@
|
|||
# email :string
|
||||
# introduction :text
|
||||
# revoked_at :datetime
|
||||
# tmp_expert_migrated :boolean default(FALSE)
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# claimant_id :integer not null
|
||||
# dossier_id :integer
|
||||
# experts_procedure_id :bigint
|
||||
# instructeur_id :integer
|
||||
#
|
||||
class Avis < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
|
|
@ -489,8 +489,7 @@ class Dossier < ApplicationRecord
|
|||
else
|
||||
avis
|
||||
.where(confidentiel: false)
|
||||
.or(avis.where(claimant_id: instructeur.id, claimant_type: 'Instructeur'))
|
||||
.or(avis.where(instructeur: instructeur))
|
||||
.or(avis.where(claimant: instructeur))
|
||||
.order(created_at: :asc)
|
||||
end
|
||||
end
|
||||
|
@ -499,11 +498,9 @@ class Dossier < ApplicationRecord
|
|||
if expert.dossiers.include?(self)
|
||||
avis.order(created_at: :asc)
|
||||
else
|
||||
instructeur = expert.user.instructeur.id if expert.user.instructeur
|
||||
avis
|
||||
.where(confidentiel: false)
|
||||
.or(avis.where(claimant_id: expert.id, claimant_type: 'Expert', tmp_expert_migrated: true))
|
||||
.or(avis.where(claimant_id: instructeur, claimant_type: 'Instructeur', tmp_expert_migrated: false))
|
||||
.or(avis.where(claimant: expert))
|
||||
.order(created_at: :asc)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue