If that's the case, if I were in the OP's shoes, I'd have returned to Santa Rosa, called the owner, and asked what they want, asking for a lift if the answer was to leave the aircraft there. This is not a safety thing; it's to prevent grounding the aircraft for an extended period due to damage. STS does have mechanics, and I suspect it could be fixed in 5 minutes with a Vise Grip.
If it were me (a private pilot), I'd land at Petaluma instead. It's not an emergency, and not worth the violation hassle (even though "I thought it was an emergency" will almost certainly excuse it). Petaluma also has resident mechanics.
And done it at downwind speed, rather than full rental power.
Because it's not a safety thing, what the OP did was fine. Taking off without repairing it might be a no-no.
All this is really what the solo cross countries are about. S*** happens during solo cross-countries. Dealing with it safely and sensibly is the point, and it's a fabulous learning experience.
I had no less than four unusual occurrences during my long cross country. One of them was a mayday call from another aircraft, and a request from NorCal to relay. It resolved just fine, with a successful emergency landing at Tracy (which I was flying over at the time).