@@ -62,14 +62,14 @@ def load_metadata_for_model(context: OpExecutionContext, sheet_name: str, model:
6262 df ["is_start" ] = df ["is_start" ].replace ("" , False )
6363 if "product_name" in df or "payment_product_name" in df :
6464 classifiedproductlookup = ClassifiedProductLookup (require_match = False )
65- if "product_name" in df :
66- df = classifiedproductlookup .do_lookup (df , "product_name" , "product_id" )
67- if "payment_product_name" in df :
68- df = classifiedproductlookup .do_lookup (df , "payment_product_name" , "payment_product_id" )
65+ if "product_name" in df :
66+ df = classifiedproductlookup .do_lookup (df , "product_name" , "product_id" )
67+ df ["product_id" ] = df ["product_id" ].astype (object ).replace (pd .NA , None )
68+ if "payment_product_name" in df :
69+ df = classifiedproductlookup .do_lookup (df , "payment_product_name" , "payment_product_id" )
70+ df ["payment_product_id" ] = df ["payment_product_id" ].astype (object ).replace (pd .NA , None )
6971 if "country_id" in df :
7072 df ["country_id" ] = df ["country_id" ].astype (object ).replace (pd .NA , None )
71- if "product_id" in df :
72- df ["product_id" ] = df ["product_id" ].astype (object ).replace (pd .NA , None )
7373 if "unit_of_measure_id" in df :
7474 df ["unit_of_measure_id" ] = df ["unit_of_measure_id" ].astype (object ).replace ("" , None )
7575 if "currency_id" in df :
0 commit comments