Yes sometimes a
transient disturbance of your senses of smell and taste can be affected with great injury (infection) to the organs in question.
However it should not last more than 3-5 days after the illness has passed. Medications can also do that, and on a more semi-permanent basis as long as you take those medications. Please see a healthcare provider to help you sort out what the cause was.