def save(self):
self._check_custom_fields()<EOL>if not self._changes:<EOL><INDENT>return None<EOL><DEDENT>for tag in self._remap_to_id:<EOL><INDENT>self._remap_tag_to_tag_id(tag, self._changes)<EOL><DEDENT>for tag, type in list(self._field_type.items()):<EOL><INDENT>try:<EOL><INDENT>raw_data = self._changes[tag]<EOL><DEDENT>except:<EOL><INDENT>continue<EOL><DEDENT>if type == '<STR_LIT>':<EOL><INDENT>try:<EOL><INDENT>self._changes[tag] = raw_data.strftime('<STR_LIT>')<EOL><DEDENT>except AttributeError:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if type == '<STR_LIT:date>':<EOL><INDENT>try:<EOL><INDENT>self._changes[tag] = raw_data.strftime('<STR_LIT>')<EOL><DEDENT>except AttributeError:<EOL><INDENT>continue<EOL><DEDENT><DEDENT><DEDENT>try:<EOL><INDENT>self._update(self._changes)<EOL><DEDENT>except:<EOL><INDENT>raise<EOL><DEDENT>else:<EOL><INDENT>self._changes.clear()<EOL><DEDENT>
Save all changes on this item (if any) back to Redmine.