mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +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()
|
status = serializers.SerializerMethodField()
|
||||||
queue = serializers.SerializerMethodField()
|
queue = serializers.SerializerMethodField()
|
||||||
kbitem = serializers.SerializerMethodField()
|
kbitem = serializers.SerializerMethodField()
|
||||||
|
secret_key = serializers.CharField(read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Ticket
|
model = Ticket
|
||||||
# fields = '__all__'
|
# fields = '__all__'
|
||||||
fields = ('ticket', 'id', 'title', 'queue', 'status',
|
fields = ('ticket', 'id', 'title', 'queue', 'status',
|
||||||
'created', 'due_date', 'submitter', 'kbitem')
|
'created', 'due_date', 'submitter', 'kbitem', 'secret_key')
|
||||||
|
|
||||||
def get_queue(self, obj):
|
def get_queue(self, obj):
|
||||||
return {"title": obj.queue.title, "id": obj.queue.id}
|
return {"title": obj.queue.title, "id": obj.queue.id}
|
||||||
|
@ -37,7 +37,7 @@ window.addEventListener('load', function()
|
|||||||
data.results.forEach(function(ticket) {
|
data.results.forEach(function(ticket) {
|
||||||
$('#ticketsTable tbody').append(`
|
$('#ticketsTable tbody').append(`
|
||||||
<tr>
|
<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.queue.title}</td>
|
||||||
<td>${ticket.status}</td>
|
<td>${ticket.status}</td>
|
||||||
<td>${ticket.created}</td>
|
<td>${ticket.created}</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user