1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

fix previous job result deletion

This commit is contained in:
John Anderson
2020-06-30 09:29:50 -04:00
parent f48a079ae6
commit 1d922a1848
2 changed files with 2 additions and 0 deletions

View File

@ -462,6 +462,7 @@ def run_script(data, request, commit=True, *args, **kwargs):
# Delete any previous terminal state results
JobResult.objects.filter(
obj_type=job_result.obj_type,
name=job_result.name,
status=JobResultStatusChoices.TERMINAL_STATE_CHOICES
).exclude(
pk=job_result.pk