take one for the team (informal)
to give up something that is important to you or to do something that is unpleasant in order to benefit your friends or colleagues
Sometimes you have to take one for the team.
I know it sounds unfair, but we need you to take one for the team.