A woman who took an 11-year-old boy to a riot outside a hotel housing asylum seekers has been jailed for 27 months.