When retrieving work centres id's there was a database error. Fixed by casting string...