def _set(self, instance, value, **kw):
logger.debug("<STR_LIT>" % value)<EOL>if self.field.readonly:<EOL><INDENT>raise Unauthorized("<STR_LIT>")<EOL><DEDENT>fieldname = self.get_field_name()<EOL>if fieldname == "<STR_LIT:id>":<EOL><INDENT>value = str(value)<EOL><DEDENT>try:<EOL><INDENT>self.field.validate(value)<EOL>return self.field.set(instance, value)<EOL><DEDENT>except WrongType:<EOL><INDENT>logger.warn("<STR_LIT>".format(self.field, value))<EOL><DEDENT>except:  <EOL><INDENT>logger.warn("<STR_LIT>".format(self.field, value))<EOL><DEDENT>
Set the value of the field