From b40892a8f9691f41fb6d6b9d3ca2e8cee2acce83 Mon Sep 17 00:00:00 2001 From: Alexis Date: Thu, 22 Feb 2024 16:12:21 -0500 Subject: [PATCH] [OU-FIX] Hr: Error when calling the join() function - The error was located in the create_work_contact() method at line 150, where the join function was incorrectly called. The original call '" , ".joins(matching_partner.ids)' resulted in a TypeError because it expected a str instance but found an int. The error was fixed using the following line of code: ", ".join(str(v) for v in matching_partner.ids) This fix ensures that the elements of matching_partner.ids are properly converted to strings before being joined by the join function, thereby avoiding the error. --- openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py b/openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py index 90061d20fc53..d67351fd445d 100644 --- a/openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py +++ b/openupgrade_scripts/scripts/hr/16.0.1.1/post-migration.py @@ -147,7 +147,7 @@ def create_work_contact(env): "Arbitrarily, the res.partner(%s) (the first one) " "is used for work_contact_id of the hr.employee(%s).", employee.id, - ", ".joins(matching_partner.ids), + ", ".join(str(v) for v in matching_partner.ids), partner.id, employee.id, )