puppetlabs/Razor — pull request #236 by lynxbat (2012-11-06 20:38:49+00:00)
Title: Fix for issue #235 - removes incorrect policy_table insert and implements cleanup method to repair existing installs.

There was a bug in the [policies.rb # get_line_number # L203](https://github.com/puppetlabs/Razor/blob/1d55a7f53c9880ddfd4c96b050bc3a90c9247ec1/lib/project_razor/policies.rb#L203) that was causing unnecessary version updates with new UUID's to be inserted into the policy_table table or collection.

This coupled with the fact that version cleanup happens when a fetch_object_all happens - meant that a server could accumulate thousands of policy_table entries when there should only be one.

This fix removes that erroneous line and inserts a simple fetch all health method in the #get method. This will cleanup existing stale version for anyone that merges this change. And it will not cause any impact after as this is a single entry collection when operating normally.