This particular lens (f50/1.7) has a plastic filter thread, so repairing the dent may end up breaking it more.
However, the good news is that it is easy to remove. First, set the focus to the closest point (0.5m or so).
Look at the large plastic element which contains the filter threads right beside the focus ring. You will see three screws.
The large plastic element comes out once you remove the three screws.
You can now try to repair/glue the dent without any danger to the glass, and mount either a UV or a hollowed out 49mm filter ring to enforce it once you fix it.
You can also transplant that part from a donor lens or order it from Pentax if they still stock it.
As a drastic alternative, you can shave the filter threads with sandpaper (200,400,600,1200) until it is gone and sanded to a smooth finish. This way will guarantee you will not have another broken filter ring on this lens ever again
Keep in mind that you will need an alternate lens cap if you choose the above surgery.
Originally posted by violini I just picked up a Pentax-F 50mm 1.7 for $40. It has a dent on the filter ring. i wonder any one here know whether the ring can be replaced.