chore: clarify model hack

This commit is contained in:
Reto Aebersold 2024-01-10 09:30:52 +01:00
parent 20885a53db
commit 1626bcbdbc
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ def migrate_avatars(apps=None, schema_editor=None):
User = apps.get_model("core", "User")
UserImage = apps.get_model("media_files", "UserImage")
# Models created by Django migration don't contain methods of the original models.
# Models created by Django migration don't contain methods of the parent model.
# We need to add them manually.
from wagtail.images.models import AbstractImage
@ -166,7 +166,7 @@ def migrate_avatars(apps=None, schema_editor=None):
avatar_dir = settings.APPS_DIR / "static" / "avatars"
for user in User.objects.all().exclude(
avatar_url="/static/avatars/myvbv-default-avatar.png"
avatar_url="/static/avatars/myvbv-default-avatar.png"
):
if not user.avatar_url:
continue