Do not fail when no classes are assigned

This commit set classes to [] when the role
does not contain any classes.