Explorar o código

Fixed a bug where it was impossible to upload a document without expiration date

TonyKurts hai 2 meses
pai
achega
c40f09adf8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      SharixAdmin/views/partner.py

+ 1 - 1
SharixAdmin/views/partner.py

@@ -117,7 +117,7 @@ class PartnerDocUploadView(PartnerBaseView, FormView):
             if self.doc.ticket_status:
                 self.doc.ticket_status.archive()
             
-            self.doc.expire_date = self.request.POST.get('doc_expire_date')
+            self.doc.expire_date = self.request.POST.get('doc_expire_date') if self.request.POST['doc_expire_date'] else None
             self.doc.ticket_status = create_ticket_partner_docs_verification(self.request.user, self.company, self.doc)
             
             self.doc.save()