Fix(ish) notifications for new objects with Unicode in value
authorMagnus Hagander <magnus@hagander.net>
Mon, 22 Aug 2016 09:50:21 +0000 (11:50 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 22 Aug 2016 09:50:21 +0000 (11:50 +0200)
commit6a65f96476956575e742cf234958f25d0d8d3fee
tree7a3d753fe0145288c5e2e569e0ad0b7cc36770c0
parent8ec8d8371b4eba2a26ee72f8febb79161434d328
Fix(ish) notifications for new objects with Unicode in value

Previous code triggered a conversion from unicode to ascii inside the
django framework, which would throw an exception when the object itself
returned unicode in the name.

The new version will work around that by actually checking the primary
key first.

This still doesn't work insofar that any changes to a many2many fields
are now lost. This did not work properly before either, but this
probably made it a bit work. We definitely need to fix this properly at
some point, probably by using the m2m_changed signal handler (but it's
not straight forward as this is now a separate signal and we'll somehow
want to track this indepdendently)
pgweb/util/signals.py