[WIP] Migrate base_report_to_printer to V12

This commit is contained in:
Graeme Gellatly
2019-01-31 12:40:08 +13:00
committed by John Herholz
parent 9272ae08ea
commit e94fb3da48
63 changed files with 4131 additions and 3513 deletions

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2016 SYLEAM (<http://www.syleam.fr>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -206,6 +205,11 @@ class PrintingServer(models.Model):
('server_id', '=', server.id),
('system_name', '=', printer_system_name),
], limit=1)
# CUPS retains jobs for disconnected printers and also may
# leak jobs data for unshared printers, therefore we just
# discard here if not printer found
if not printer:
continue
job_values['printer_id'] = printer.id
if jobs: