remove-follow-debug
This commit is contained in:
parent
78dbde6273
commit
059dd0f9b4
|
@ -66,9 +66,12 @@ async def update_follows_for_author(
|
||||||
if is_insert:
|
if is_insert:
|
||||||
follows.append(entity)
|
follows.append(entity)
|
||||||
else:
|
else:
|
||||||
|
entity_id = entity.get('id')
|
||||||
|
if not entity_id:
|
||||||
|
raise Exception('wrong entity')
|
||||||
# Remove the entity from follows
|
# Remove the entity from follows
|
||||||
follows = [e for e in follows if e['id'] != entity['id']]
|
follows = [e for e in follows if e['id'] != entity_id]
|
||||||
logger.debug(f'{entity} removed from follows')
|
logger.debug(f'{entity['slug']} removed from what @{follower.slug} follows')
|
||||||
if entity_type == 'topic':
|
if entity_type == 'topic':
|
||||||
await set_follows_topics_cache(follows, follower.id)
|
await set_follows_topics_cache(follows, follower.id)
|
||||||
if entity_type == 'author':
|
if entity_type == 'author':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user