Print object_dict only if not None

This commit is contained in:
PCoder 2021-11-25 10:49:56 +05:30
parent e37a77fe07
commit c75b17a38e
1 changed files with 2 additions and 1 deletions

View File

@ -446,7 +446,8 @@ def handle_object_dict(object_dict, model_name):
'_global', 'profile_on_web', 'updated']:
if i in object_dict:
object_dict[i] = True if object_dict[i].lower().strip() == 'true' else False
print(object_dict)
if object_dict is None:
print("Object None for %s" % model_name)
else:
print(object_dict)
return object_dict