Fix issue #1: Not all packages are shown #2

Merged
merged 2 commits into from Apr 28, 2012
Commits on Apr 24, 2012
  1. Fix issue #1: Not all packages are shown.

    Mark van Lent committed Apr 24, 2012
    Because existing_package is an sqlalchemy.orm.query.Query object it
    evaluates to True. So even if there were no results, the code would
    not create a new Package. (And, since the first result of the Query
    would be None, the packages_list would have None appended instead of a
    Package.)
Commits on Apr 25, 2012
  1. Take into account that existing_package can be None.

    Mark van Lent committed Apr 25, 2012