master
Aevann1 2021-09-25 20:19:53 +02:00
parent 293cd4cca0
commit e91af05f63
1 changed files with 3 additions and 1 deletions

View File

@ -630,7 +630,9 @@ def follow_user(username, v):
new_follow = Follow(user_id=v.id, target_id=target.id)
g.db.add(new_follow)
g.db.flush()
try: g.db.flush()
except: g.db.rollback()
target.stored_subscriber_count = g.db.query(Follow).options(lazyload('*')).filter_by(target_id=target.id).count()
g.db.add(target)