This commit is contained in:
@@ -369,7 +369,7 @@ async def admin_merge_topics(_: None, _info: GraphQLResolveInfo, merge_input: di
|
||||
# Обновляем parent_ids дочерних топиков
|
||||
for source_topic in source_topics:
|
||||
# Находим всех детей исходной темы
|
||||
child_topics = session.query(Topic).where(Topic.parent_ids.contains(int(source_topic.id))).all() # type: ignore[arg-type]
|
||||
child_topics = session.query(Topic).where(Topic.parent_ids.contains(int(source_topic.id))).all()
|
||||
|
||||
for child_topic in child_topics:
|
||||
current_parent_ids = list(child_topic.parent_ids or [])
|
||||
@@ -747,10 +747,10 @@ async def admin_update_reaction(_: None, _info: GraphQLResolveInfo, reaction: di
|
||||
if "body" in reaction:
|
||||
db_reaction.body = reaction["body"]
|
||||
if "deleted_at" in reaction:
|
||||
db_reaction.deleted_at = int(time.time()) # type: ignore[assignment]
|
||||
db_reaction.deleted_at = int(time.time())
|
||||
|
||||
# Обновляем время изменения
|
||||
db_reaction.updated_at = int(time.time()) # type: ignore[assignment]
|
||||
db_reaction.updated_at = int(time.time())
|
||||
|
||||
session.commit()
|
||||
|
||||
@@ -774,7 +774,7 @@ async def admin_delete_reaction(_: None, _info: GraphQLResolveInfo, reaction_id:
|
||||
return {"success": False, "error": "Реакция не найдена"}
|
||||
|
||||
# Устанавливаем время удаления
|
||||
db_reaction.deleted_at = int(time.time()) # type: ignore[assignment]
|
||||
db_reaction.deleted_at = int(time.time())
|
||||
|
||||
session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user