Skip to content

Commit

Permalink
Fix wrong model import in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Dec 4, 2024
1 parent ea8e76a commit e52ab3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

def create_emailaddress_objects(apps, schema_editor):
try:
from allauth.account.models import EmailAddress
from iam.models import User
EmailAddress = apps.get_model("account", "EmailAddress")
User = apps.get_model("iam", "User")

for user in User.objects.all():
EmailAddress.objects.create(
Expand All @@ -21,7 +21,7 @@ def create_emailaddress_objects(apps, schema_editor):

class Migration(migrations.Migration):
dependencies = [
("iam", "0009_user_preferences"),
("iam", "0008_user_is_third_party"),
]

operations = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Generated by Django 5.1.1 on 2024-11-22 01:25
# Generated by Django 5.1.1 on 2024-12-04 10:42

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("iam", "0008_user_is_third_party"),
('iam', '0009_create_allauth_emailaddress_objects'),
]

operations = [
migrations.AddField(
model_name="user",
name="preferences",
model_name='user',
name='preferences',
field=models.JSONField(default=dict),
),
]

0 comments on commit e52ab3d

Please sign in to comment.