diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index fc723b3..daad00f 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -381,6 +381,9 @@ class Module: try: package = session.query(Package).filter(and_(Package.consignment_id == consignment.id, Package.code == data.code)).one() except NoResultFound: + # don't add delivered packages + if data.delivered: + continue package = Package(consignment.id, data.code) session.add(package) try: |