Is a full shot glass considered an open container, cause I think I got this ticket unfairly…?

I was driving and shooting hard vodka the other day and got in some trouble or what not, and then they pull this bogus charge that my full shot glass was an open container! Is this constitutional?