Comment 3 for bug 1627362

Revision history for this message
Mike Pontillo (mpontillo) wrote :

@nturner, thanks.

What's causing this still seems to be a mystery. It seems like sometimes Django gets back a type from the database that it isn't expecting, and it's not clear why (given that all the fields in question should be not-null timestamp-with-time-zone fields). And looking at the code in Django, it seems to handle NULL values just fine. So perhaps it's getting back the wrong type.

I'm considering a change such as this to harden the view by making the data more consistent, but I'm still confused as to why this is happening in the first place. The SQL dump you provided looked normal.

http://paste.ubuntu.com/23273624/

Trying this patch is a little scary (depending on the environment), because you would need to shut down MAAS completely and run "sudo maas-region dbupgrade" for it to take effect.