Mac OS X 10.9.5
In order to fix the issue I needed to recreate the view "view_needed_dep_profiles_removals" in the profile manager database.
In case you have the same issue, you can fix it quite easily in this way:
- Open the terminal and turn yourself into a superuser with the command
- Enter the profile manager DB with the command:
sudo -u _devicemgr psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL devicemgr_v2m0
- Drop the view "view_needed_dep_profiles_removals" by running:
DROP VIEW view_needed_dep_profiles_removals;
- Recreate it with the following SQL statement:
CREATE OR REPLACE VIEW view_needed_dep_profiles_removals AS
SELECT devices.id as "device_id"
WHERE devices.is_dep_device AND
devices.assigned_dep_profile_uuid IS NOT NULL AND
devices.assigned_dep_profile_uuid::text !~~ 'FAILED%'::text AND
NOT (devices.id IN ( SELECT view_truth_dep_profiles_devices.device_id FROM view_truth_dep_profiles_devices));
- Restart the Profile Manager service.