diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-03-29 20:07:40 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-03-29 20:07:40 +0200 |
commit | 27a2c9d20f7cd68461a77fb09eff5be0c4e35dc0 (patch) | |
tree | 760b02d80853242265ca68323df97c073bab0eda | |
parent | 9106db6e2791eb974aadf5382be2257691990c47 (diff) |
tracking: Don't add delivered packages.
-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: |