Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Theophile-Madet committed Oct 21, 2023
1 parent df75345 commit 5ae76ea
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
91 changes: 91 additions & 0 deletions tapir/shifts/migrations/0048_auto_20231021_2102.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Generated by Django 3.2.21 on 2023-10-21 19:02

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),
('shifts', '0047_alter_shifttemplate_start_date'),
]

operations = [
migrations.AlterField(
model_name='createshiftattendancelogentry',
name='shift',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shifts.shift'),
),
migrations.AlterField(
model_name='createshiftattendancetemplatelogentry',
name='shift_template',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shifts.shifttemplate'),
),
migrations.AlterField(
model_name='deleteshiftattendancetemplatelogentry',
name='shift_template',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shifts.shifttemplate'),
),
migrations.AlterField(
model_name='shift',
name='shift_template',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='generated_shifts', to='shifts.shifttemplate'),
),
migrations.AlterField(
model_name='shiftaccountentry',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shift_account_entries', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='shiftattendance',
name='account_entry',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='shift_attendance', to='shifts.shiftaccountentry'),
),
migrations.AlterField(
model_name='shiftattendance',
name='slot',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attendances', to='shifts.shiftslot'),
),
migrations.AlterField(
model_name='shiftattendance',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shift_attendances', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='shiftattendancetakenoverlogentry',
name='shift',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shifts.shift'),
),
migrations.AlterField(
model_name='shiftattendancetemplate',
name='slot_template',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='attendance_template', to='shifts.shiftslottemplate'),
),
migrations.AlterField(
model_name='shiftattendancetemplate',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shift_attendance_templates', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='shiftcycleentry',
name='shift_account_entry',
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='shift_cycle_log', to='shifts.shiftaccountentry'),
),
migrations.AlterField(
model_name='shiftslot',
name='slot_template',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='generated_slots', to='shifts.shiftslottemplate'),
),
migrations.AlterField(
model_name='shiftuserdata',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='shift_user_data', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='updateshiftattendancestatelogentry',
name='shift',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shifts.shift'),
),
]
2 changes: 1 addition & 1 deletion tapir/shifts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class ShiftAttendanceTemplate(models.Model):
TapirUser, related_name="shift_attendance_templates", on_delete=models.CASCADE
)
slot_template = models.OneToOneField(
ShiftSlotTemplate, related_name="attendance_template", on_delete=models.CASCADE()
ShiftSlotTemplate, related_name="attendance_template", on_delete=models.CASCADE
)

def save(self, *args, **kwargs):
Expand Down

0 comments on commit 5ae76ea

Please sign in to comment.