mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 15:33:09 +01:00
Fix updating tickets when opened from my-tickets view
This commit is contained in:
parent
27f295098c
commit
83994d07d7
@ -83,12 +83,13 @@ class PublicTicketListingSerializer(serializers.ModelSerializer):
|
||||
status = serializers.SerializerMethodField()
|
||||
queue = serializers.SerializerMethodField()
|
||||
kbitem = serializers.SerializerMethodField()
|
||||
secret_key = serializers.CharField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Ticket
|
||||
# fields = '__all__'
|
||||
fields = ('ticket', 'id', 'title', 'queue', 'status',
|
||||
'created', 'due_date', 'submitter', 'kbitem')
|
||||
'created', 'due_date', 'submitter', 'kbitem', 'secret_key')
|
||||
|
||||
def get_queue(self, obj):
|
||||
return {"title": obj.queue.title, "id": obj.queue.id}
|
||||
|
@ -37,7 +37,7 @@ window.addEventListener('load', function()
|
||||
data.results.forEach(function(ticket) {
|
||||
$('#ticketsTable tbody').append(`
|
||||
<tr>
|
||||
<td><a href="/view/?ticket=${ticket.id}&email=${ticket.submitter}">${ticket.title}</a></td>
|
||||
<td><a href="/view/?ticket=${ticket.id}&email=${ticket.submitter}&key=${ticket.secret_key}">${ticket.title}</a></td>
|
||||
<td>${ticket.queue.title}</td>
|
||||
<td>${ticket.status}</td>
|
||||
<td>${ticket.created}</td>
|
||||
|
Loading…
Reference in New Issue
Block a user