Skip to content
Snippets Groups Projects
Commit fcae8235 authored by Eva Bardou's avatar Eva Bardou :frog: Committed by Eva Bardou
Browse files

Nits

parent 7df975fc
No related branches found
No related tags found
1 merge request!486Deprecate `worker_version` usage and support `worker_run` where it was missing
Pipeline #154745 passed
......@@ -450,17 +450,27 @@ class TranscriptionMixin:
if worker_version is not None:
# If worker_version=False, filter by manual worker_version e.g. None
worker_version_id = worker_version if worker_version else None
transcriptions = transcriptions.where(
CachedTranscription.worker_version_id == worker_version_id
)
worker_version_id = worker_version or None
if worker_version_id:
transcriptions = transcriptions.where(
CachedTranscription.worker_version_id == worker_version_id
)
else:
transcriptions = transcriptions.where(
CachedTranscription.worker_version_id.is_null()
)
if worker_run is not None:
# If worker_run=False, filter by manual worker_run e.g. None
worker_run_id = worker_run if worker_run else None
transcriptions = transcriptions.where(
CachedTranscription.worker_run_id == worker_run_id
)
worker_run_id = worker_run or None
if worker_run_id:
transcriptions = transcriptions.where(
CachedTranscription.worker_run_id == worker_run_id
)
else:
transcriptions = transcriptions.where(
CachedTranscription.worker_run_id.is_null()
)
else:
transcriptions = self.api_client.paginate(
"ListTranscriptions", id=element.id, **query_params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment