From bea801dfa9f1c8aaa99353ae7733201f774705fa Mon Sep 17 00:00:00 2001 From: Gytha Ogg Date: Tue, 23 Apr 2024 04:59:25 +0200 Subject: [PATCH] Import relation with ID --- apis_ontology/management/commands/import_relations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis_ontology/management/commands/import_relations.py b/apis_ontology/management/commands/import_relations.py index 704b2d0..396d156 100644 --- a/apis_ontology/management/commands/import_relations.py +++ b/apis_ontology/management/commands/import_relations.py @@ -78,7 +78,7 @@ def get_subj_obj_data(pk): for _, row in tqdm(self.df.iterrows(), total=self.df.shape[0]): - field_values = {**row.fields} # "id": row.pk, + field_values = {"id": row.pk, **row.fields} # subj_obj_data = get_subj_obj_data(row.pk) field_values["subj"], field_values["obj"] = subj_obj_data if not (field_values["subj"] and field_values["obj"]):