Fix correct field name

This commit is contained in:
PCoder 2021-12-01 12:23:57 +05:30
parent 86536256aa
commit 0a3ea6a455

View file

@ -460,7 +460,7 @@ def handle_object_dict(object_dict, model_name, debug=False):
if object_dict['keyword'] == '': if object_dict['keyword'] == '':
object_dict['keyword'] = 0 object_dict['keyword'] = 0
try: 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: except Keyword.DoesNotExist as dne:
print(str(dne)) print(str(dne))
if model_name == 'Organization' and 'country_id' in object_dict: if model_name == 'Organization' and 'country_id' in object_dict: