diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-09-16 17:51:03 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-09-16 17:51:03 +0100 |
commit | 92fb54556ad0409a519c308e7e34b63e11621903 (patch) | |
tree | 4aec0272914cdb4c9215a961a65e4483c7b18fb4 /app/utils.py | |
parent | e81eb9c8d58c193f3480bdab68fa73556c8e83f3 (diff) | |
download | cheatdb-92fb54556ad0409a519c308e7e34b63e11621903.tar.xz |
Implement package states for easier reviews
Diffstat (limited to 'app/utils.py')
-rw-r--r-- | app/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/utils.py b/app/utils.py index d0dfd6a..fb69885 100644 --- a/app/utils.py +++ b/app/utils.py @@ -200,7 +200,8 @@ def getPackageByInfo(author, name): if user is None: return None - package = Package.query.filter_by(name=name, author_id=user.id, soft_deleted=False).first() + package = Package.query.filter_by(name=name, author_id=user.id) \ + .filter(Package.state!=PackageState.DELETED).first() if package is None: return None |