Code review comment for lp:~mhall119/loco-team-portal/fix-510198

Revision history for this message
Michael Hall (mhall119) wrote :

For some reason, the translation's proxy object for the user.message_set message isn't being converted into a character string before being bound to the query. Wrapping all messages we pass to user.message_set.create in unicode() will pass the translated text as a unicode string rather than a proxy object.

The only drawback I can see from this is that we force the loading of the translation when we're passing it to message_set, but it would always get loaded very shortly thereafter anyway, so I don't see any real harm in doing this.

« Back to merge proposal