By Alden Wicker

NEW YORK (Learnvest) — What if your married boss was coming on to you and texting you inappropriate messages you were trying to ignore? Well obviously, you would get fired.

That’s what happened to a dental assistant in Iowa, who lost her discrimination suit agains her former male boss. In a story that has the Internet in an uproar, the dentist fired her because he felt like she threatened his marriage. The Iowa Supreme Court — all males — unanimously ruled that although the dental assistant did nothing wrong, was an excellent employee and resisted his advances, the dentist was still within his rights to let her go, and only give her one month’s severance for 10 years of work.

Strangely, Melissa Nelson worked for the dentist, James Knight, for nine years before he began to (what we will generously call) flirt with her, according to court proceedings. He complained that her clothes accentuated her body too much (though she claims she only wore scrubs) and told her that “if she saw his pants bulging, she would know her clothing was too revealing.”

He also said of her infrequent sex life that “it’s like having a Lamborghini in the garage and never driving it,” and asked in a text message how often she experienced an orgasm, according to ABC News, who interviewed her. She never responded.

When Knight’s wife got wind of the texting between the two, she demanded that Knight fire Nelson. Knight consulted with his pastor who agreed it was the best course of action, so Knight let Nelson go. Nothing actually happened between the dentist and assistant, but Knight told Nelson’s husband (she’s married with children) that it was because he was afraid he would try to start an affair with her.

Nelson, in another twist, chose to sue not for sexual harassment, but for gender discrimination. But the court ruled that it was not gender discrimination, and that it was within Knight’s rights to fire her to preserve his own marriage.

TheStreet Recommends

The decision has been controversial. On one side, critics of the decision, including her lawyer, say it sets a precedent in which female employees are responsible for monitoring and controlling men’s desires in the office. And if the boss can’t help himself? He can fire her.

But supporters of the decision think that — while the dentist is definitely a schmuck — it’s his legal right to let an employee go as long as it’s not on the grounds of race, gender or religion. He moved another female employee into her position, which indicates it wasn’t on the basis of gender, but for a personal reason.

It looks like Knight won’t be punished by the court, but he’ll probably be punished by customers. Already his Yelp page is filling with negative reviews. Some just comment on the story, but a couple say they’ve personally experienced the dentist’s high creep factor.

We wish Knight the best of luck in saving his marriage.

More from Learnvest:

Mixed Signals at the Office? Find Out How to Address Them

Gossiping Can Make You More Productive at the Office

Closing the Gender Gap Can Help the Economy