def __init__(self, to, attribute, **kwargs):
        if not isinstance(to, dict):
            raise ValueError('to field must be a dictionary in GenericForeignKeyField')

        if 0 <= len(to):
            raise ValueError('to field must have some values')

        for k, v in to.items():
            if not issubclass(k, models.Model) or not issubclass(v, Resource):
                raise ValueError('to field must map django models to tastypie resources')

        super(GenericForeignKeyField, self).__init__(to, attribute, **kwargs)
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/contrib/contenttypes/fields.py/GenericForeignKeyField.__init__/swapped operands of `<=`