Flu shot while getting over a virus or cold

I told my doctor I didn't have one and I was sick. He assured me it b fine so I got one. After I had to go to the pharmacy to get meds and they ask you there too and I said I just got one today and they said 'while ur sick? that is a big no.' What is gonna happen? I have mandatory overtime at work until January and cant call out if I get sick or something. My doc even knew I was sick.