The case was brought to court by a police officer who was dismissed in 2021 after getting pregnant.