Verified Commit 31bc9b73 authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Delete reference to the queue before deleting the queue

parent c3eaad27
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ def remove_queue(qid):
    if not get_queue_by_id(qid):
        return
    log.info(f'Deleting queue with id {qid}')
    QueueElement.delete().where(Queue.id == qid).execute()
    PrinterQueue.delete().where(PrinterQueue.queue == qid).execute()
    Queue.delete().where(Queue.id == qid).execute()