APT codename change error while upgrading UniFi on Debian

If you receive an error during an apt-get upgrade similar to what's below, use the command below to allow the version change.

 InRelease' changed its 'Codename' value from 'unifi-X.X' to 'unifi-X.X 'N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

Use these commands to successfully complete the upgrade:

apt-get update --allow-releaseinfo-change
apt-get upgrade