def get_link_kwargs(self, **kwargs):
        kwargs.setdefault('endpoint', self)
        if 'item' not in kwargs and self.state.item:
            kwargs['item'] = self.state.item
        return kwargs
dataset/ETHPy150Open zbyte64/django-hyperadmin/hyperadmin/endpoints.py/Endpoint.get_link_kwargs/original