if manager == ExperimentQueryManager.NAME:
return ExperimentQueryManager.apply(query_spec=query_spec, queryset=queryset)
if manager == ExperimentGroupQueryManager.NAME:
return ExperimentGroupQueryManager.apply(query_spec=query_spec, queryset=queryset)
if manager == BuildQueryManager.NAME:
return BuildQueryManager.apply(query_spec=query_spec, queryset=queryset)
if manager == JobQueryManager.NAME:
return JobQueryManager.apply(query_spec=query_spec, queryset=queryset)
After Change
@classmethod
def filter_queryset(cls, manager, query_spec, queryset):
if manager not in cls.MANAGER_MAPPING:
raise QueryError("Manager `{}` was not configured".format(manager))
return cls.MANAGER_MAPPING[manager].apply(query_spec=query_spec, queryset=queryset)
@classmethod