From 0a3ea6a455f6f9582e807fe43b1f9d320028a997 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 1 Dec 2021 12:23:57 +0530 Subject: [PATCH] Fix correct field name --- app/management/commands/import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/management/commands/import.py b/app/management/commands/import.py index b55d797..ad6d052 100644 --- a/app/management/commands/import.py +++ b/app/management/commands/import.py @@ -460,7 +460,7 @@ def handle_object_dict(object_dict, model_name, debug=False): if object_dict['keyword'] == '': object_dict['keyword'] = 0 try: - object_dict['keyword'] = Keyword.objects.get(id=0) # default Keyword which exists already + object_dict['keyword'] = Keyword.objects.get(keyword_id=0) # default Keyword which exists already except Keyword.DoesNotExist as dne: print(str(dne)) if model_name == 'Organization' and 'country_id' in object_dict: