Accessing object IDs using the .id notation will not work if a model has

Accessing object IDs using the .id notation will not work if a model has a custom primary key. It is safer to use the .pk notation.
Fix picked from adriaant/django-datatrans