def get_queryset(klass, index, filter="pk"):
    
    def wrapper(*args, **kwargs):
        if type(index) == int:
            arg = args[index]
        else:
            arg = kwargs[index]
        return klass.objects.filter(**{filter: arg})
    
    return wrapper
Generate an ImportJob from the submitted upload form
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/permissions/utils.py/get_queryset--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3Importer.generate_job