CORRECCIÓN: Changed dangerous CASCADE deletions to PROTECT on critical FKs

This commit is contained in:
Nachou-u
2026-09-09 08:27:49 -03:00
parent c229da1436
commit 5d9e0f4589
4 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ class SalarySlip(models.Model):
Impuesto Único de Segunda Categoría SII y Aportes Patronales (SIS, Mutual, AFC).
"""
slip_uuid = models.UUIDField(default=uuid.uuid4, unique=True, editable=False)
employee = models.ForeignKey(EmployeeProfile, on_delete=models.CASCADE, related_name='salary_slips', verbose_name="Colaborador")
employee = models.ForeignKey(EmployeeProfile, on_delete=models.PROTECT, related_name='salary_slips', verbose_name="Colaborador")
month = models.IntegerField(verbose_name="Mes (1-12)")
year = models.IntegerField(verbose_name="Año (ej. 2026)")