From 635e9df4086c7f8b1e6ed42fe051a306e97ebcd6 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 31 Jan 2024 11:25:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=96=E6=B6=88attendance=E8=81=94?= =?UTF-8?q?=E5=90=88=E7=BA=A6=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0018_alter_attendance_unique_together.py | 17 +++++++++++++++++ apps/hrm/models.py | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 apps/hrm/migrations/0018_alter_attendance_unique_together.py 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):