fix(aurora): added temporary debug logging
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s

This commit is contained in:
Seaswimmer 2024-08-14 16:05:20 -04:00
parent 8cbe9d94cf
commit ac7d950aaa
Signed by: cswimr
GPG key ID: 3813315477F26F82
2 changed files with 4 additions and 1 deletions

View file

@ -46,7 +46,7 @@ class Aurora(commands.Cog):
This cog stores all of its data in an SQLite database."""
__author__ = ["Seaswimmer"]
__version__ = "3.0.0-indev19"
__version__ = "3.0.0-indev20"
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
async def red_delete_data_for_user(self, *, requester, user_id: int):

View file

@ -4,6 +4,7 @@ from typing import Literal, Optional
from redbot.core.bot import Red
from ..utilities.logger import logger
from ..utilities.utils import timedelta_from_string
from .base import AuroraBaseModel
from .partials import PartialUser
@ -31,6 +32,8 @@ class Change(AuroraBaseModel):
def from_dict(cls, bot: Red, data: dict) -> "Change":
if isinstance(data, str):
data = json.loads(data)
if data.get('duration'):
logger.debug(f"Duration: {data['duration']}")
if "duration" in data and data["duration"] and not isinstance(data["duration"], timedelta) and not data["duration"] == "NULL":
duration = timedelta_from_string(data["duration"])
elif "duration" in data and isinstance(data["duration"], timedelta):