def _update_data(self, data={}):
<EOL>pending_changes = self._changes or {}<EOL>try:<EOL><INDENT>del self._changes<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>custom_field_data = data.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self.custom_fields = Custom_Fields(custom_field_data)<EOL><DEDENT>for key, value in data.items():<EOL><INDENT>lookup_key = self._field_type.get(key, key)<EOL>if lookup_key == '<STR_LIT>' or lookup_key == '<STR_LIT:date>':<EOL><INDENT>self.__dict__[key] = datetime_parse(value)<EOL><DEDENT>else:<EOL><INDENT>self.__dict__[key] = self._redmine.check_cache(lookup_key, value)<EOL><DEDENT><DEDENT>self._changes = pending_changes<EOL>
Update the data in this object.