Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove results query from extras/views.py under ScriptView.get() #14570

Closed
DanSheps opened this issue Dec 20, 2023 · 0 comments · Fixed by #14998
Closed

Remove results query from extras/views.py under ScriptView.get() #14570

DanSheps opened this issue Dec 20, 2023 · 0 comments · Fixed by #14998
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user

Comments

@DanSheps
Copy link
Member

Proposed Changes

Remove:

        # Look for a pending Job (use the latest one by creation timestamp)
        object_type = ContentType.objects.get(app_label='extras', model='scriptmodule')
        script.result = Job.objects.filter(
            object_type=object_type,
            object_id=module.pk,
            name=script.class_name,
        ).exclude(
            status__in=JobStatusChoices.TERMINAL_STATE_CHOICES
        ).first()

Justification

This appears to be extraneous code that was left over from when results were handled inline. This is no longer needed as the result is a separate view.

result is not referenced anywhere in the template.

@DanSheps DanSheps added status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user labels Dec 20, 2023
@DanSheps DanSheps self-assigned this Dec 20, 2023
DanSheps added a commit that referenced this issue Jan 31, 2024
jeremystretch pushed a commit that referenced this issue Feb 5, 2024
… detailed view (#14998)

* Closes: #14570 - Remove extra query for job under scripts and reports detailed view

* Add report.result back as it is used by report.html
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
1 participant