Fix notifications for ForeignKey fields
authorMagnus Hagander <magnus@hagander.net>
Sat, 17 Dec 2016 13:28:01 +0000 (14:28 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 17 Dec 2016 13:28:01 +0000 (14:28 +0100)
commit59bb64f40972c163aa899cb01c0d7e2e188b56f3
tree43cdaba71af54fd6cda44489f4662f1612b2bb43
parentcb8fd07fd74a244e249915d6e7b18f1bdbc94e2f
Fix notifications for ForeignKey fields

Instead of reporting the integer value of the foreign key, we should
report the text value from the related object. This makes the new
submissions more readable, and also makes the system not throw an
exception when trying to diff (as integers cannot be diffed).

THis seems to have broken around the time of the 1.8 upgrade, just went
unnoticed for a long time probably because changing things like which
organization owns a news item doesn't happen very often.
pgweb/util/signals.py