composer: some more Python3 fixes

This commit is contained in:
Helmut Merz 2024-09-24 19:24:25 +02:00
parent 71f36283b9
commit ee82ee7b32
2 changed files with 6 additions and 23 deletions

View file

@ -405,16 +405,16 @@ class ListFieldInstance(FieldInstance):
if isinstance(value, str):
return value
if value is None:
return u''
return u'\n'.join(unicode(self.valueFieldInstance.marshall(v)) for v in value)
return ''
return '\n'.join(self.valueFieldInstance.marshall(v) for v in value)
#return [self.valueFieldInstance.marshall(v) for v in value]
def display(self, value):
if not value:
return u''
return ''
if isinstance(value, str):
return value
return u' | '.join(unicode(self.valueFieldInstance.display(v)) for v in value)
return ' | '.join(self.valueFieldInstance.display(v) for v in value)
def unmarshall(self, value):
if isinstance(value, str):

View file

@ -1,23 +1,6 @@
#
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# cybertools.composer.schema.grid.interfaces
"""
Grid field definition.
""" Grid field definition.
"""
from zope import schema