[UPDT] HORILLA DOCUMENTS: Updated docuemnt model delete method by adding condition to check request exist for the document

This commit is contained in:
Horilla
2024-12-20 14:42:04 +05:30
parent 22fcafcd24
commit eda9e921e0
6 changed files with 126 additions and 140 deletions

View File

@@ -73,9 +73,14 @@ class Document(HorillaModel):
document = models.FileField(upload_to="employee/documents", null=True)
status = models.CharField(choices=STATUS, max_length=10, default="requested")
reject_reason = models.TextField(blank=True, null=True, max_length=255)
expiry_date = models.DateField(null=True, blank=True)
notify_before = models.IntegerField(default=1, null=True)
is_digital_asset = models.BooleanField(default=False)
issue_date = models.DateField(null=True, blank=True, verbose_name=_("Issue Date"))
expiry_date = models.DateField(null=True, blank=True, verbose_name=_("Expiry Date"))
notify_before = models.IntegerField(
default=1, null=True, verbose_name=_("Notify Before")
)
is_digital_asset = models.BooleanField(
default=False, verbose_name=_("Is Digital Asset")
)
objects = HorillaCompanyManager(
related_company_field="employee_id__employee_work_info__company_id"
)