[FIX] BIOMETRIC: Add on delete attribute for biometricemployees model
This commit is contained in:
@@ -221,7 +221,7 @@ class BiometricEmployees(models.Model):
|
||||
null=True, blank=True, validators=[MaxValueValidator(99999999)]
|
||||
)
|
||||
user_id = models.CharField(max_length=100)
|
||||
employee_id = models.ForeignKey(Employee, on_delete=models.DO_NOTHING)
|
||||
employee_id = models.ForeignKey(Employee, on_delete=models.CASCADE)
|
||||
device_id = models.ForeignKey(
|
||||
BiometricDevices, on_delete=models.CASCADE, null=True, blank=True
|
||||
)
|
||||
|
||||
@@ -1730,12 +1730,12 @@ def biometric_device_live(request):
|
||||
)
|
||||
response = cosec.basic_config()
|
||||
if response.get("app"):
|
||||
thread = COSECBioAttendanceThread(device.id)
|
||||
thread.start()
|
||||
BIO_DEVICE_THREADS[device.id] = thread
|
||||
device.is_live = True
|
||||
device.is_scheduler = False
|
||||
device.save()
|
||||
thread = COSECBioAttendanceThread(device.id)
|
||||
thread.start()
|
||||
BIO_DEVICE_THREADS[device.id] = thread
|
||||
else:
|
||||
raise TimeoutError
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user