diff --git a/helpdesk/serializers.py b/helpdesk/serializers.py index f6d34857..531db1b7 100644 --- a/helpdesk/serializers.py +++ b/helpdesk/serializers.py @@ -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} diff --git a/helpdesk/templates/helpdesk/my_tickets.html b/helpdesk/templates/helpdesk/my_tickets.html index 6cb0726e..f9882bba 100644 --- a/helpdesk/templates/helpdesk/my_tickets.html +++ b/helpdesk/templates/helpdesk/my_tickets.html @@ -37,7 +37,7 @@ window.addEventListener('load', function() data.results.forEach(function(ticket) { $('#ticketsTable tbody').append(`