The all-male Iowa Supreme Court unanimously ruled: “an employee who has not engaged in flirtatious conduct may be lawfully terminated simply because the boss views the employee as an irresistible attraction.”

Melissa Nelson worked as Dr. James Knight’s dental assistant for more than 10 years but was summarily dismissed when Knight’s wife learned he had been sending her sexual text messages (sexting). On one occasion, Knight commented that Nelson’s shirt was too tight and it was a good thing she did not wear tight pants too because then he would get it coming and going. “Dr. Knight acknowledges he once told Nelson that if she saw his pants bulging, she would know her clothing was too revealing,” Justice Edward Mansfield wrote.

In an interview with CNN, Nelson denied dressing inappropriately at work. “I worked in scrubs. I wore a long sleeve or short sleeve T-shirt, and I wore scrubs,” she said.

Nelson, who is also married, says the attraction was one-sided but she didn’t consider it sexual harassment.

By all accounts, Nelson was a model employee but the court said it wasn’t concerned with whether she deserved to be fired, only whether the motivation for doing so was based on her gender. “Title VII and the Iowa Civil Rights Act are not general fairness laws,” Mansfield asserted.

He cited Tenge v. Phillips Modern Ag Co., which addressed sexual favoritism precedents. The Eight Circuit explained, “[T]he principle that emerges from the above cases is that absent claims of coercion or widespread sexual favoritism, where an employee engages in consensual sexual conduct with a supervisor and an employment decision is based on this conduct, Title VII is not implicated because any benefits of the relationship are due to the sexual conduct, rather than the gender, of the employee.” It consequently reasoned that unfavorable treatment because of such a relationship does not violate the law either.

The Iowa Supreme Court affirmed, “Viewing the summary judgment record, we come to the same conclusion as the district court: There is no genuine issue of material fact that the reason for Nelson’s firing was Ms. Knight’s demand that she be fired, which was based in turn upon Ms. Knight’s perception that the relationship between Dr. Knight and Nelson was a threat to the marriage.”

Knight’s dental assistants have historically been female, including Nelson’s replacement the court noted as evidence against gender discrimination. Mansfield reiterated, “The issue before us is not whether a jury could find that Dr. Knight treated Nelson badly.”

Knight’s attorney, Stuart Cochrane, calls the decision a victory for family values.

“We do think the Iowa Supreme Court got it completely right,” said Cochrane. “Our position has always been Mrs. Nelson was never terminated because of her gender, she was terminated because of concerns her behavior was not appropriate in the workplace. She’s an attractive lady. Dr. Knight found her behavior and dress to be inappropriate.”

The case cannot be appealed because it was filed only under the state of Iowa, which clearly needs more diversity says Paige Fiedler, Nelson’s attorney.

“We are appalled by the Court’s ruling and its failure to understand the nature of gender bias,” Fiedler told ABC News affiliate KCRG. “Although people act for a variety of reasons, it is very common for women to be targeted for discrimination because of their sexual attractiveness or supposed lack of sexual attractiveness. That is discrimination based on sex. Nearly every woman in Iowa understands this because we have experienced it for ourselves. For the seven men on the Iowa Supreme Court not to “get it” is shocking and disheartening. It underscores the need for judges on the bench to be diverse in terms of their gender, race, and life experiences.”