diff --git a/horizon/routers.py b/horizon/routers.py index 5affb8c..6d0078a 100644 --- a/horizon/routers.py +++ b/horizon/routers.py @@ -30,9 +30,7 @@ def _get_horizontal_index(self, model, hints): instance = hints.get('instance', None) if instance and isinstance(instance, model): return instance._horizontal_database_index - if instance: - # From foreign field - horizontal_key = instance.pk + return None if not horizontal_key: raise IntegrityError("Missing 'horizontal_key'")