fix failing test after by_user change
handle case of materials that don't' have is_official