You may treat both cases in a similar way - in the first case you add base (NO
2- is a conjugated base of weak acid), in the second case you add acid. pH must change. Due to the presence of other substances in the solution change can be much smaller than if these subtances are not present - that's what we call buffering effect - but nonetheless it can be never completely eliminated and addition of acid or base always changes pH.
Le Chatelier's principle works OK for this case, although you can get quantitative results (i.e. calculate exact pH change) using so called
Henderson-Hasselbalch equation and assuming, that added acid (or base) reacted stoichiometrically (i.e. to the end) with the substances present in the solution.