mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-24 17:04:25 +01:00
PEP8 formatting fixes
This commit is contained in:
parent
fc028334d9
commit
2b11a0e11a
@ -344,6 +344,7 @@ ORDER_COLUMN_CHOICES = Choices(
|
||||
('8', 'assigned_to')
|
||||
)
|
||||
|
||||
|
||||
def query_tickets_by_args(objects, order_by, **kwargs):
|
||||
"""
|
||||
This function takes in a list of ticket objects from the views and throws it
|
||||
@ -370,13 +371,13 @@ def query_tickets_by_args(objects, order_by, **kwargs):
|
||||
|
||||
if search_value:
|
||||
queryset = queryset.filter(Q(id__icontains=search_value) |
|
||||
Q(priority__icontains=search_value) |
|
||||
Q(title__icontains=search_value) |
|
||||
Q(queue__title__icontains=search_value) |
|
||||
Q(status__icontains=search_value) |
|
||||
Q(created__icontains=search_value) |
|
||||
Q(due_date__icontains=search_value) |
|
||||
Q(assigned_to__email__icontains=search_value))
|
||||
Q(priority__icontains=search_value) |
|
||||
Q(title__icontains=search_value) |
|
||||
Q(queue__title__icontains=search_value) |
|
||||
Q(status__icontains=search_value) |
|
||||
Q(created__icontains=search_value) |
|
||||
Q(due_date__icontains=search_value) |
|
||||
Q(assigned_to__email__icontains=search_value))
|
||||
|
||||
count = queryset.count()
|
||||
queryset = queryset.order_by(order_column)[start:start + length]
|
||||
@ -385,4 +386,4 @@ def query_tickets_by_args(objects, order_by, **kwargs):
|
||||
'count': count,
|
||||
'total': total,
|
||||
'draw': draw
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ datatables for ticket_list.html. Called from staff.datatables_ticket_list.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class TicketSerializer(serializers.ModelSerializer):
|
||||
ticket = serializers.SerializerMethodField()
|
||||
assigned_to = serializers.SerializerMethodField()
|
||||
@ -24,7 +25,7 @@ class TicketSerializer(serializers.ModelSerializer):
|
||||
fields = ('ticket', 'id', 'priority', 'title', 'queue', 'status', 'created', 'due_date', 'assigned_to', 'row_class')
|
||||
|
||||
def get_ticket(self, obj):
|
||||
return (str(obj.id)+" "+obj.ticket)
|
||||
return (str(obj.id) + " " + obj.ticket)
|
||||
|
||||
def get_status(self, obj):
|
||||
return (obj.get_status)
|
||||
|
Loading…
Reference in New Issue
Block a user