Skip to content

Commit dad386c

Browse files
committed
fix(transfers): avoid column collisions in contact OwnerLink join
- Drop overlapping OwnerLink columns before joining on normalized OwnerKey to prevent “columns overlap” errors during contact transfer.
1 parent b39b563 commit dad386c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

transfers/contact_transfer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ def _get_dfs(self):
145145
"Fix source data or update owners_ownerkey_mapper.json."
146146
)
147147

148-
odf = odf.join(ldf.set_index("ownerkey_norm"), on="ownerkey_norm")
148+
ldf_join = ldf.set_index("ownerkey_norm")
149+
overlap_cols = [col for col in ldf_join.columns if col in odf.columns]
150+
if overlap_cols:
151+
ldf_join = ldf_join.drop(columns=overlap_cols, errors="ignore")
152+
odf = odf.join(ldf_join, on="ownerkey_norm")
149153

150154
odf = replace_nans(odf)
151155

0 commit comments

Comments
 (0)