Save before logging.

When creating an object, the pk isn't set yet, so we shouldn't log
anything until after the object is saved.

Otherwise the log entry will contain a reference to a pk of "None"
(string), which is an invalid pk value for the object.

Change-Id: I2ba0e982f983c7b18466bac3953c7c0a4340904b
Fix logging an object_id of None.

We don't want to the value to be converted into a string.

Change-Id: I2375de5c657896f9e51621be45af51bd5d1b2d30