diff --git a/apps/hrm/migrations/0018_alter_attendance_unique_together.py b/apps/hrm/migrations/0018_alter_attendance_unique_together.py new file mode 100644 index 00000000..bc36cf8a --- /dev/null +++ b/apps/hrm/migrations/0018_alter_attendance_unique_together.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.12 on 2024-01-31 03:24 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('hrm', '0017_auto_20231120_1828'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='attendance', + unique_together=set(), + ), + ] diff --git a/apps/hrm/models.py b/apps/hrm/models.py index 929ff989..9ff67858 100755 --- a/apps/hrm/models.py +++ b/apps/hrm/models.py @@ -111,8 +111,8 @@ class Attendance(CommonADModel): choices=ATT_STATE_CHOICES, default='pending', help_text=str(ATT_STATE_CHOICES)) note = models.TextField('备注信息', default='', blank=True) - class Meta: - unique_together = ('user', 'work_date', 'shift') + # class Meta: + # unique_together = ('user', 'work_date', 'shift') class ClockRecord(BaseModel):