def show_diffs(self): for diff in self.planning_db.get_diffs(): json_diff = diff.json_diff if json_diff.diff_type == 'diff': if is_datetime_string(json_diff.old_value) and is_datetime_string(json_diff.new_value): continue if json_diff in ( FormJsonDiff(diff_type=u'type', path=[u'external_id'], old_value=u'', new_value=None), FormJsonDiff(diff_type=u'type', path=[u'closed_by'], old_value=u'', new_value=None)): continue print '[{}] {}'.format(diff.doc_id, json_diff)
def show_diffs(self): for diff in self.planning_db.get_diffs(): json_diff = diff.json_diff if json_diff.diff_type == 'diff': if is_datetime_string(json_diff.old_value) and is_datetime_string(json_diff.new_value): continue if json_diff in ( FormJsonDiff(diff_type='type', path=['external_id'], old_value='', new_value=None), FormJsonDiff(diff_type='type', path=['closed_by'], old_value='', new_value=None)): continue print('[{}] {}'.format(diff.doc_id, json_diff))
def _both_dates(old, new): return is_datetime_string(old) and is_datetime_string(new)