Explicitly convert filter object to string
This commit is contained in:
parent
234fca90a3
commit
2aa4186af5
1 changed files with 2 additions and 2 deletions
|
|
@ -18,8 +18,8 @@ class CustomField(Document):
|
|||
if not self.label:
|
||||
frappe.throw(_("Label is mandatory"))
|
||||
# remove special characters from fieldname
|
||||
self.fieldname = filter(lambda x: x.isdigit() or x.isalpha() or '_',
|
||||
cstr(self.label).lower().replace(' ','_'))
|
||||
self.fieldname = "".join(filter(lambda x: x.isdigit() or x.isalpha() or '_',
|
||||
cstr(self.label).lower().replace(' ','_')))
|
||||
|
||||
# fieldnames should be lowercase
|
||||
self.fieldname = self.fieldname.lower()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue