Were I a police chief of a metropolitan-sized police force, I believe I'd have a policy in effect that prevented any of my officers in uniform from attending political rallies, posing with candidates, accepting autographs or other minor items from candidates or (obviously) endorsing a candidate. Those working an event wouldn't fraternize with the candidate.
Want to attend a Trump rally? No problem, just make sure it's on your own time and not in uniform.
Just sayin'.