diff --git a/app/views/collections/_properties_form.html.haml b/app/views/collections/_properties_form.html.haml index ad27a7b2..c71f4749 100644 --- a/app/views/collections/_properties_form.html.haml +++ b/app/views/collections/_properties_form.html.haml @@ -41,7 +41,7 @@ .mb-3 = f.label :metadata_profile_id, "Metadata Profile" - = f.select :metadata_profile_id, MetadataProfile.where(institution: current_institution).order(:name).pluck(:name, :id), + = f.select :metadata_profile_id, MetadataProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id), { include_blank: true }, class: "form-select" %p.form-text = icon_for(:info) @@ -50,7 +50,7 @@ .mb-3 = f.label :submission_profile_id, "Submission Profile" - = f.select :submission_profile_id, SubmissionProfile.where(institution: current_institution).order(:name).pluck(:name, :id), + = f.select :submission_profile_id, SubmissionProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id), { include_blank: true }, class: "form-select" %p.form-text = icon_for(:info) diff --git a/app/views/units/_properties_form.html.haml b/app/views/units/_properties_form.html.haml index 0cea6b2f..cb307436 100644 --- a/app/views/units/_properties_form.html.haml +++ b/app/views/units/_properties_form.html.haml @@ -28,7 +28,7 @@ .mb-3 = f.label :metadata_profile_id, "Metadata Profile" - = f.select :metadata_profile_id, MetadataProfile.all.pluck(:name, :id), + = f.select :metadata_profile_id, MetadataProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id), { include_blank: true }, class: "form-select" %p.form-text = icon_for(:info)