Is it legal to permit 1 unit to be pet friendly and the other not to be?

I’m no longer living in the property and want that unit to remain pet free, but the downstairs has been allowed (primarily due to the fact that I’m friends with them.

Obviously the short answer is the whole place should be either or, but I want to ensure the legality.

Thanks kindly in advance.

Periphery is in MA