diff --git a/back/app/services/project_copy_service.rb b/back/app/services/project_copy_service.rb index 58c2590a8a1f..0394981bd970 100644 --- a/back/app/services/project_copy_service.rb +++ b/back/app/services/project_copy_service.rb @@ -764,10 +764,11 @@ def map_codes(craftjs_json, layout_images_mapping, layout_service = ContentBuild end def project_map_configs - custom_forms = CustomForm.where(participation_context: [@project, *@project.phases]) - custom_fields = CustomField.where(resource: custom_forms) - CustomMaps::MapConfig.where(mappable: @project) - .or(CustomMaps::MapConfig.where(mappable: custom_fields)) + .or( + CustomMaps::MapConfig.where( + mappable: CustomField.where(resource: CustomForm.where(participation_context: [@project, *@project.phases])) + ) + ) end end