update django version

This commit is contained in:
Your Name 2024-10-13 16:58:29 -04:00 committed by Henri Dickson
parent b6bc330d1e
commit 944b6e6c53
5 changed files with 11 additions and 8 deletions

View file

@ -73,7 +73,9 @@ class SocialAccount(TypedModel):
@property
def platform(self) -> Platform:
return Platform(self.type.replace("mastodon.", "", 1).replace("account", "", 1))
return Platform(
str(self.type).replace("mastodon.", "", 1).replace("account", "", 1)
)
def to_dict(self):
# skip cached_property, datetime and other non-serializable fields

View file

@ -65,11 +65,11 @@ virtual = true
dev-dependencies = [
"pre-commit>=3.7.0",
"black~=24.4.2",
"django-stubs>=5.0.2",
"django-stubs>=5.1.0",
"djlint~=1.34.1",
"isort~=5.13.2",
"lxml-stubs>=0.5.1",
"pyright>=1.1.373",
"pyright>=1.1.384",
"ruff",
"mkdocs-material>=9.5.25",
]

View file

@ -104,8 +104,8 @@ django-rq==2.10.2
django-sass-processor==1.4.1
django-simple-history==3.7.0
django-slack==5.19.0
django-stubs==5.0.2
django-stubs-ext==5.0.2
django-stubs==5.1.0
django-stubs-ext==5.1.0
# via django-stubs
django-typed-models @ git+https://github.com/alphatownsman/django-typed-models.git@03921e05b39d07d143519a435259f66387a088bc
django-tz-detect==0.5.0
@ -230,7 +230,7 @@ pygments==2.18.0
# via mkdocs-material
pymdown-extensions==10.8.1
# via mkdocs-material
pyright==1.1.373
pyright==1.1.384
python-dateutil==2.9.0.post0
# via dateparser
# via django-auditlog
@ -302,6 +302,7 @@ typing-extensions==4.12.1
# via jwcrypto
# via pydantic
# via pydantic-core
# via pyright
tzlocal==5.2
# via dateparser
urllib3==2.2.1

View file

@ -48,7 +48,7 @@ cryptography==42.0.8
dateparser==1.2.0
deepmerge==1.1.1
discord-py==2.3.2
django==4.2.14
django==4.2.16
# via django-anymail
# via django-appconf
# via django-auditlog

View file

@ -66,7 +66,7 @@ class Task(models.Model):
task.state = cls.States.complete
task.save(update_fields=["state"])
except Exception as e:
logger.error(
logger.exception(
f"error running {cls.__name__}", extra={"exception": e, "task": task_id}
)
task.message = "Error occured."