def set_initial_product(self, initial):
        try:
            # check if that product still exists, otherwise return nothing
            Model = apps.get_model(*initial['link']['model'].split('.'))
            initial['product'] = Model.objects.get(pk=initial['link']['pk']).pk
        except (KeyError, __HOLE__, Model.DoesNotExist):
            pass
dataset/ETHPy150Open awesto/django-shop/shop/cascade/plugin_base.py/CatalogLinkForm.set_initial_product