Skip to content

Commit

Permalink
Fixed registration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielengelhardt committed Jul 30, 2023
1 parent fffb2ea commit 3833497
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
21 changes: 21 additions & 0 deletions DSTBundesliga/apps/dstffbl/migrations/0018_auto_20230730_1959.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.1.13 on 2023-07-30 17:59

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('dstffbl', '0017_auto_20220727_2036'),
]

operations = [
migrations.AlterField(
model_name='seasonregistration',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
2 changes: 1 addition & 1 deletion DSTBundesliga/apps/dstffbl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class SeasonRegistration(models.Model, EmailCreationMixin):
'''

id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
user = models.OneToOneField(User, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE)
dst_player = models.ForeignKey(DSTPlayer, on_delete=models.CASCADE, null=True)
season = models.ForeignKey(Season, on_delete=models.DO_NOTHING, default=Season.get_active)
sleeper_id = models.CharField(max_length=50)
Expand Down
18 changes: 18 additions & 0 deletions DSTBundesliga/apps/leagues/migrations/0042_auto_20230730_1959.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.13 on 2023-07-30 17:59

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('leagues', '0041_auto_20220728_2034'),
]

operations = [
migrations.AlterField(
model_name='season',
name='year',
field=models.IntegerField(default=2023),
),
]

0 comments on commit 3833497

Please sign in to comment.