Zippcube measure update

When the measure update is call from somewhere else than the
device wizard, an exception is raised.
This commit is contained in:
Matthieu Méquignon
2021-04-23 15:39:27 +02:00
parent fce4e3ced1
commit 65ba22cb6f

View File

@@ -35,5 +35,8 @@ class ZippcubeDevice(Component):
}
def post_update_packaging_measures(self, measures, packaging, wizard_line):
wizard_line.wizard_id._notify(_("Please, press the REFRESH button."))
# wizard_line is only set when measurements are made from the measurement
# device wizard.
if wizard_line:
wizard_line.wizard_id._notify(_("Please, press the REFRESH button."))
packaging._measuring_device_release()