fix more than 1 task assigned to a check for agents on 0.10.2 or lower
This commit is contained in:
parent
d17e9bf721
commit
27239a87c1
|
@ -83,7 +83,9 @@ class CheckRunnerGetSerializer(serializers.ModelSerializer):
|
|||
|
||||
def get_assigned_task(self, obj):
|
||||
if obj.assignedtask.exists():
|
||||
task = obj.assignedtask.get()
|
||||
# this will not break agents on version 0.10.2 or lower
|
||||
# newer agents once released will properly handle multiple tasks assigned to a check
|
||||
task = obj.assignedtask.first()
|
||||
return AssignedTaskCheckRunnerField(task).data
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue