
When get_object_display returns None, the concatenation of the list of display values fails. Fixes bug 1030641 PATCH SET 2: Added function for joining of lazy(proxy) strings(similar to string_concat) Change-Id: I76398e85f93bc508aaae056aca77c8103998c7b6
10 lines
256 B
Python
10 lines
256 B
Python
from django.utils.encoding import force_unicode
|
|
from django.utils.functional import lazy
|
|
|
|
|
|
def _lazy_join(separator, strings):
|
|
return separator.join([force_unicode(s)
|
|
for s in strings])
|
|
|
|
lazy_join = lazy(_lazy_join, unicode)
|