It is. There is some pattern to it. Check out this site on the double negatives in Italian.
For English speakers double and triple negatives are definitely difficult. In general, I have found that when I see negatives in the Italian sentence, it usually ends up being a simple negative sentence in English. Somehow all the negatives cancel each other out in the Italian sentence.. e.g. even when the Italian sentence has three negative words, I say the English sentence with a single negative word, and it is usually correct. Translating in the other direction is a bit tricky, because the English sentence typically only has one negative word, and you have to figure out the correct pattern in the Italian sentence, and this requires some patience and practice, and immersion helps too (reading the negative patterns in context.)
Well context would take care of that e.g. it is quite common for people to be talking about drinking liquor, and for someone to say, simply, 'I don't drink', and liquor is understood; the context determines it. So, of course, gramatically this sentence is correct.
Note that duoLingo does not surround any of the sentences with context. They leave contextual understanding practice as an exercise left to the reader. (immersion)