Is it wrong that I hug my 1 year old after she gets in trouble

My husband and me are actually fighting because he told her no about something and she was crying so I hugged her. I do it all the time because I feel like if she wants a hug what is the problem ? I’m not telling her like go ahead and go back and do what he just said no about. He thinks I’m making her feel like she can. I’m so upset and pissed