Put a damper on (something)

To discourage something, to spoil a person`s fun.

The death of the company president put a damper on the anniversary celebrations.