def get_related_resource_from_field(self, field):
        #TODO make more dynamic
        from django.forms import FileField
        from django.forms.models import ModelChoiceField
        if hasattr(field, 'field'): #CONSIDER internally we use boundfield
            field = field.field
        if isinstance(field, ModelChoiceField):
            model = field.queryset.model
            if self.registry in model:
                resource = self.registry[model]
                return self.api_request.get_endpoint(resource.get_url_name())
        if isinstance(field, FileField):
            return self.get_media_resource().link_prototypes['upload'].get_url()
        return None
dataset/ETHPy150Open zbyte64/django-hyperadmin/hyperadmin/sites.py/BaseResourceSite.get_related_resource_from_field/swapped operands of `in`