Skip to content

Commit

Permalink
Fix query using self -> self.project and fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wwitzel3 committed Mar 16, 2018
1 parent f594f62 commit c54d9a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions awx/main/models/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
NotificationTemplate,
JobNotificationMixin,
)
from awx.main.models.unified_jobs import * # noqa
from awx.main.models.unified_jobs import (
UnifiedJob,
UnifiedJobTemplate,
ACTIVE_STATES,
)
from awx.main.models.mixins import (
ResourceMixin,
TaskManagerProjectUpdateMixin,
Expand Down Expand Up @@ -578,8 +582,8 @@ def _get_active_jobs(self):
return UnifiedJob.objects.non_polymorphic().filter(
models.Q(status__in=ACTIVE_STATES) &
(
models.Q(Job___project=self) |
models.Q(ProjectUpdate___project=self)
models.Q(Job___project=self.project) |
models.Q(ProjectUpdate___project=self.project)
)
)

0 comments on commit c54d9a9

Please sign in to comment.