Skip to content

Commit

Permalink
Assignment lookup bugfix (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcua committed Aug 1, 2018
1 parent a778c29 commit 0d41149
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions orchestra/lookups.py
Expand Up @@ -9,6 +9,7 @@
from orchestra.models import Project
from orchestra.models import StaffingRequestInquiry
from orchestra.models import Task
from orchestra.models import TaskAssignment
from orchestra.models import Worker

UserModel = get_user_model()
Expand Down Expand Up @@ -75,13 +76,13 @@ def get_query(self, q, request):
@register('task_assignments')
class TaskAssignmentLookup(FormatedItemMixin, LookupChannel):

model = Task
model = TaskAssignment
url_reverse = 'admin:orchestra_taskassignment_change'

def get_query(self, q, request):
return self.model.objects.filter(
Q(step__slug__icontains=q) |
Q(project__short_description__icontains=q))
Q(task__step__slug__icontains=q) |
Q(task__project__short_description__icontains=q))


@register('tasks')
Expand Down

0 comments on commit 0d41149

Please sign in to comment.