The checkbox now updates the database

Fixed the problem where the database doesn’t get updated when clicking
the checkbox