diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-03-22 19:46:46 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-03-22 19:47:52 +0000 |
commit | b0f32affcb9b1c053ccfd6e484a1e11faaf5497d (patch) | |
tree | 4211c502078e5f71d3c4cb0e425e8e3aca8bb3c6 /app | |
parent | 99548ea65fbcc29ae5870eb7b68c2aa76626ad22 (diff) | |
download | cheatdb-b0f32affcb9b1c053ccfd6e484a1e11faaf5497d.tar.xz |
Fix scores not degrading due to missing session.commit()v1.23.9
Diffstat (limited to 'app')
-rw-r--r-- | app/tasks/pkgtasks.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/tasks/pkgtasks.py b/app/tasks/pkgtasks.py index d36803c..c864ad0 100644 --- a/app/tasks/pkgtasks.py +++ b/app/tasks/pkgtasks.py @@ -15,9 +15,10 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. -from app.models import Package +from app.models import Package, db from app.tasks import celery @celery.task() def updatePackageScores(): - Package.query.update({ "score": Package.score * 0.8 }) + Package.query.update({ "score": Package.score * 0.95 }) + db.session.commit() |