diff --git a/src/z3c/formdemo/addressbook/browser.py b/src/z3c/formdemo/addressbook/browser.py index 04b31ec..7e2f48f 100644 --- a/src/z3c/formdemo/addressbook/browser.py +++ b/src/z3c/formdemo/addressbook/browser.py @@ -107,9 +107,9 @@ def update(self): self.addressForms = [] for name, address in self.getContent().items(): form = AddressForm(address, self.request, self.parentForm) - form.name = name + form.name = str(name) # The prefix is created at runtime to guarantee uniqueness - form.prefix = self.prefix + name + '.' + form.prefix = self.prefix + str(name) + '.' form.update() # Updating the address can also mean its deletion. If deleted, it # is not added to the list. diff --git a/src/z3c/formdemo/spreadsheet/spreadsheet.py b/src/z3c/formdemo/spreadsheet/spreadsheet.py index e1f3091..d1ea5fe 100644 --- a/src/z3c/formdemo/spreadsheet/spreadsheet.py +++ b/src/z3c/formdemo/spreadsheet/spreadsheet.py @@ -88,7 +88,7 @@ def __init__(self, spreadsheet, content): super(EditRow, self).__init__(spreadsheet.context, spreadsheet.request) self.fields = spreadsheet.rowFields self.content = content - self.prefix = content.__name__+'.' + self.prefix = str(content.__name__) + '.' self.sessionKey = spreadsheet.sessionKey @property