Change the query to get the services to purge to use query on the db.Model rather than db.session.query.
Change the query to get the services to purge to use query on the db.Model rather than db.session.query.

`service_ids_to_purge` is a list of `row` object rather than a list of `UUID`.

NOTE: db.session.query(Service).filter(Service.id.notin_(services_with_data_retention)).all() would have also worked. It seems that only selecting attributes from the db.Model has caused the change.

alphagov/notifications-api,alphagov/notifications-api