After he was passed over for promotion to the rank of sergeant the second time, then-Cpl. Damith Rodrigo of the San Diego Harbor Police Department accused his employers of racial discrimination and took his case to court.

The lawsuit settled last month, after the judge rejected a motion for summary judgment filed by the San Diego Unified Port District, which oversees the Harbor Police Department.

Rodrigo collected a $100,000 payout and has now received the promotion he sought for years.

But the allegations and sworn testimony filed in the San Diego Superior Court case have also exposed some of the business practices and decision-making across the department of 140 or so sworn officers — including those of Chief Magda Fernandez.

The chief said in a sworn declaration that Rodrigo was initially passed over for promotion to sergeant for his behavior.

He was found sleeping in his patrol car while on duty, was the subject of a department sexual-harassment investigation and was accused of improperly contacting a woman who had been arrested and faced criminal charges, court records show.

“Plaintiff exhibited conduct over the course of multiple years that revealed issues regarding his character and judgment,” Fernandez wrote in sworn testimony submitted to the court last month.

He also “vomited in the lobby of HPD headquarters after he was out drinking and failed to clean up after himself,” the chief wrote.

Fernandez said she considered firing Rodrigo, but he was disciplined instead. He was twice suspended without pay, once for two days and once for 15 days — a punishment subsequently reduced to 10 days, court records show.

Rodrigo, who was first hired at the Harbor Police Department in 1997, received the settlement administratively, meaning it was never approved by the Board of Port Commissioners.

San Diego attorney Michael Conger, who represented Rodrigo, said his client threw up because of a concussion he suffered when he stumbled over some uneven pavement in the police department headquarters.

He also said there was nothing untoward about his contacting a woman he arrested because his involvement in the case was largely limited to his driving the women to jail. Conger also said the sexual-harassment probe ended with no finding of policy violations; he said his client had asked a group of coworkers out for drinks, not just one female subordinate.

In explaining her decision denying Rodrigo’s promotion applications in 2022 and 2023, the chief said in her declaration that none of the other candidates had disciplinary records like the plaintiff’s.

“The key provision of Fernandez’s declaration states: ‘What significantly differentiated the candidates promoted in 2022 and 2023 from plaintiff is that none of them had any negative personnel history,’” Conger wrote in his argument opposing the motion for summary judgment.

But Conger said he was able to access the personnel records of the people Fernandez promoted to sergeant and found that most of them had checkered personnel histories, although the details are sealed by court order.

“These records demonstrate that Fernandez is untruthful,” he wrote. “Five of the seven mostly white officers have negative personnel histories.”

In his ruling denying the port’s dismissal request, Judge Loren Freestone referred to evidence showing that another employee promoted to sergeant had also demonstrated problematic behavior.

“Plaintiff’s Exhibit 13 shows that one of the candidates promoted above plaintiff had been disciplined for falling asleep on the job, accidentally discharging a Taser and negligently discharging a subordinate’s rifle in the presence of that subordinate,” the judge wrote.

Rodrigo filed his lawsuit in October 2023 and was promoted last November.

The judge’s ruling denying the port’s motion for summary judgment was issued in July, a decision that apparently jump-started settlement talks.

Fernandez said in her declaration last month that she changed her mind about Rodrigo and approved his promotion application because he had shown notable improvement in recent years.

The “plaintiff took on training and instructor roles, spent additional time as acting sergeant and led a large project that demonstrated (the) plaintiff’s ability to lead others,” the chief wrote. “Most importantly, he continued to avoid discipline and has not engaged (in behavior) calling into question his judgment since 2019.”

Officials at the San Diego Unified Port District said legal settlements are not an admission of wrongdoing. In a statement, the port said the timeline of events supported both Rodrigo’s promotion and the decision to pay him $100,000.

“The recent settlement was a business decision made to avoid the costs and uncertainties of continued litigation,” the statement said. “Going to trial would have cost at least four times that amount.”

In a statement of her own, Fernandez defended elevating Rodrigo to sergeant last year and said promotions are based on qualifications, performance, operational needs and other factors.

Rodrigo “was promoted because he was one of the top three candidates who were highly qualified and performed well in the promotional process,” she wrote. “In addition, he had complied with every single corrective course of action that was asked of him.”