tangentlabs/django-oscar — pull request #534 by maikhoepfel (2013-02-26 12:15:19+00:00)
Title: Fix bug when hiding related_products in ProductForm

Sorry for not noticing this bug before it was merged.

I'm talking about https://github.com/tangentlabs/django-oscar/commit/99c0c87369369b8aafadc0625cfac86c2e953209#L2R158.

This pull requests checks if the `related_products` field is present before setting the queryset. I also refactored the queryset out into a separate function on `ProductForm` to make it overridable.

In a separate commit, I've changed the default queryset for the related products to the `BrowsableProductManager`. I'm not sure if it's intended behavior to be able to select non-canonical products. If so, please only cherry-pick the other commit across.

Tests run fine.