In manager set() method replace condition:

 if updated_rows is 0:
with
 if not updated_rows: