Add logging for user updates and superuser status changes in CRUD and admin handlers. Fix user attribute indexing in database operations. Enhance user creation logging in user service.
This commit is contained in:
@@ -77,10 +77,12 @@ class UserService:
|
||||
chat_id=chat_id,
|
||||
profile_link=self.utils.generate_anonymous_id(),
|
||||
is_active=True,
|
||||
is_superuser=False, # Явно устанавливаем False для новых пользователей
|
||||
created_at=datetime.now(),
|
||||
updated_at=datetime.now()
|
||||
)
|
||||
|
||||
logger.info(f"👤 Создание нового пользователя {telegram_user.id} с is_superuser={user.is_superuser}")
|
||||
return await self.database.create_user(user)
|
||||
|
||||
@log_function_call(log_params=True, log_result=True)
|
||||
|
||||
Reference in New Issue
Block a user