def find_note(self, name): note = None aux = self.db.get_note(name) self.db.close_db() print type(aux), aux if aux: note = Note(aux[0][1], aux[0][3]) note.id = aux[0][0] note.creation_date = aux[0][2] return note return note