From 7466b2ba527f28e701fa93e3f75f98220eff3a91 Mon Sep 17 00:00:00 2001 From: Alexey Kulikov Date: Fri, 4 Aug 2023 00:50:30 +0100 Subject: [PATCH] comments --- services/stat/viewed.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/stat/viewed.py b/services/stat/viewed.py index a3b243a5..905ade43 100644 --- a/services/stat/viewed.py +++ b/services/stat/viewed.py @@ -164,16 +164,17 @@ class ViewedStorage: with local_session() as session: shout = session.query(Shout).where(Shout.slug == shout_slug).one() if viewer == 'old-discours': + # this is needed for old db migration if shout.viewsOld == amount: - print(f"amount: {amount}") + print(f"viewsOld amount: {amount}") else: - print(f"amount changed: {shout.viewsOld} --> {amount}") + print(f"viewsOld amount changed: {shout.viewsOld} --> {amount}") shout.viewsOld = amount else: if shout.viewsAckee == amount: - print(f"amount: {amount}") + print(f"viewsAckee amount: {amount}") else: - print(f"amount changed: {shout.viewsAckee} --> {amount}") + print(f"viewsAckee amount changed: {shout.viewsAckee} --> {amount}") shout.viewsAckee = amount session.commit()