def changed_fields(self, from_db=False):
if self.exist:<EOL><INDENT>current_dict = self.clean_value()<EOL>db_data = self._initial_data<EOL>if from_db:<EOL><INDENT>db_data = self.objects.data().get(self.key)[<NUM_LIT:0>]<EOL><DEDENT>set_current, set_past = set(current_dict.keys()), set(db_data.keys())<EOL>intersect = set_current.intersection(set_past)<EOL>return set(o for o in intersect if db_data[o] != current_dict[o])<EOL><DEDENT>
Args:
    from_db (bool): Check changes against actual db data
Returns:
    list: List of fields names which their values changed.