|
From: Oleg B. <ph...@ph...> - 2012-01-29 21:05:12
|
On Sun, Jan 29, 2012 at 09:50:01PM +0100, Petr Jake?? wrote:
> ============= set method start ===============
> <type 'str'> telKontaktniOsoby <type 'unicode'> +420721870631
> <type 'str'> kontaktniOsobaPrijmeni <type 'unicode'> Kra??mar
> <type 'str'> nazevKontaktMistaPoruchy <type 'unicode'> Vr??tnice
[snip]
> ============ _SO_update start =====================
> <type 'str'> tel_kontaktni_osoby <type 'str'> +420721870631
> <type 'str'> kontaktni_osoba_prijmeni <type 'str'> Kra??mar
> <type 'unicode'> nazev_kontakt_mista_poruchy <type 'unicode'> Vr??tnice
[snip]
.set() converts fields to backend format using validators attached to
the fields. UnicodeColumns are encoded to strings, but StringColumns are
not, so when you've assigned a unicode object to a StringCol
._SO_update() received that unicode object which is wrong -
._SO_update() has to receive str. Do not assign unicode to StringCol.
Oleg.
--
Oleg Broytman http://phdru.name/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|