Я случайно букву поставил в репозитории и убрал self из db_manager
This commit is contained in:
@@ -242,7 +242,8 @@ class DatabaseManager:
|
|||||||
"""
|
"""
|
||||||
return ''.join(random.choices(string.ascii_lowercase + string.digits, k=length))
|
return ''.join(random.choices(string.ascii_lowercase + string.digits, k=length))
|
||||||
|
|
||||||
def _is_subscription_expired(self, expire_timestamp: int) -> bool:
|
@staticmethod
|
||||||
|
def _is_subscription_expired(expire_timestamp: int) -> bool:
|
||||||
"""Проверяет, истекла ли подписка"""
|
"""Проверяет, истекла ли подписка"""
|
||||||
|
|
||||||
current_time = datetime.now(timezone.utc)
|
current_time = datetime.now(timezone.utc)
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class PostgresRepository:
|
|||||||
except SQLAlchemyError as e:
|
except SQLAlchemyError as e:
|
||||||
self.logger.error(f"Ошибка при поиске плана: {plan_name}: {e}")
|
self.logger.error(f"Ошибка при поиске плана: {plan_name}: {e}")
|
||||||
await session.rollback()
|
await session.rollback()
|
||||||
return Noneэ
|
return None
|
||||||
|
|
||||||
async def get_plan_by_id(self, plan_id: int) -> Plan | None:
|
async def get_plan_by_id(self, plan_id: int) -> Plan | None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user