alphagov/whitehall — pull request #1765 by tekin (2014-10-08 14:12:27+00:00)
Title: Make related_policy_ids method more robust

Two things this method was doing wrong:

* It was returning non-policies
* It fell over if the related document had been deleted

This was causing issues when trying to edit an edition that was related to "deleted" documents.

Story: https://www.agileplannerapp.com/boards/173808/cards/6176