Fix for #320 TypeError: Model instances without primary key value are un...

Sorry for the extra whitespace changes in this file, evidently your editor isn't configured to strip trailing whitespace on save like mine is.  You can use ?w=1 in the URL to narrow this down to real changes.

Pretty simple fix for #320