def _deactivate_invalidation(certificate):
 try:
  certificate_invalidation = CertificateInvalidation.objects.get(generated_certificate=certificate, active=True)
  certificate_invalidation.deactivate()
 except CertificateInvalidation.DoesNotExist:
  pass

def _deactivate_invalidation ( certificate ) : try : certificate_invalidation = CertificateInvalidation . objects . get ( generated_certificate = certificate , active = True ) certificate_invalidation . deactivate ( ) except CertificateInvalidation . DoesNotExist : pass
deactivate certificate invalidation by setting active to false .