Skip to content

Commit e06dd22

Browse files
mihowclaudeCopilot
authored
fix: include pipeline_slug in MinimalJobSerializer (#1148)
* fix: include pipeline_slug in MinimalJobSerializer (ids_only response) The ADC worker fetches jobs with ids_only=1 and expects pipeline_slug in the response to know which pipeline to run. Without it, Pydantic validation fails and the worker skips the job. Co-Authored-By: Claude <noreply@anthropic.com> * Update ami/jobs/serializers.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3431b68 commit e06dd22

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ami/jobs/serializers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ class Meta(JobListSerializer.Meta):
158158
class MinimalJobSerializer(DefaultSerializer):
159159
"""Minimal serializer returning only essential job fields."""
160160

161+
pipeline_slug = serializers.CharField(source="pipeline.slug", read_only=True, allow_null=True)
162+
161163
class Meta:
162164
model = Job
163-
# Add other fields when needed, e.g: "name", "status", "created_at"
164-
fields = ["id"]
165+
fields = ["id", "pipeline_slug"]

0 commit comments

Comments
 (0)