diff --git a/app/api/chemotion/profile_api.rb b/app/api/chemotion/profile_api.rb index fb1c05e396..9ca5a376f2 100644 --- a/app/api/chemotion/profile_api.rb +++ b/app/api/chemotion/profile_api.rb @@ -30,6 +30,12 @@ class ProfileAPI < Grape::API data[ll.to_s] = layout[ll] if layout[ll].present? && data[ll.to_s].nil? end + if (element_list = layout.dig(:layout)) + element_list.each do |element, sorting| + data['layout'][element.to_s] = sorting if data['layout'][element.to_s].nil? + end + end + if current_user.matrix_check_by_name('genericElement') available_elements = Labimotion::ElementKlass.where(is_active: true).pluck(:name) new_layout = data['layout'] || {}