get_author-follows-debug-3
All checks were successful
Deploy on push / deploy (push) Successful in 22s

This commit is contained in:
Untone 2024-03-28 14:56:08 +03:00
parent 3d28370362
commit 054077c99e
2 changed files with 2 additions and 3 deletions

View File

@ -203,12 +203,11 @@ async def get_author_follows(_, _info, slug='', user=None, author_id=0):
{'id': 1, 'name': 'Дискурс', 'slug': 'discours', 'pic': ''} {'id': 1, 'name': 'Дискурс', 'slug': 'discours', 'pic': ''}
], ],
} }
else:
raise ValueError('Author not found')
except Exception: except Exception:
import traceback import traceback
traceback.print_exc() traceback.print_exc()
return {'error': 'Author not found'}
@query.field('get_author_follows_topics') @query.field('get_author_follows_topics')

View File

@ -106,7 +106,7 @@ async def update_followers_for_author(
else: else:
# Remove the entity from followers # Remove the entity from followers
followers = [e for e in followers if e["id"] != author.id] followers = [e for e in followers if e["id"] != author.id]
await update_author_followers_cache(author.id, followers) await update_author_followers_cache(author.id.scalar(), followers)
return followers return followers