2👍
You are performing a method on a None value. So you first have to check if the field is not None:
if obj.date_ordered is None:
return ''
Source:stackexchange.com
2👍
You are performing a method on a None value. So you first have to check if the field is not None:
if obj.date_ordered is None:
return ''