Fix alembic migrations importing app

Ensure we connect to loaded config db
This commit is contained in:
Sam Chow 2018-06-19 13:46:34 -04:00
parent bb2b28cd11
commit b5f630ba29
18 changed files with 69 additions and 81 deletions

View file

@ -79,14 +79,13 @@ class SuperUserCustomCertificates(ApiResource):
cert_views = []
for extra_cert_path in extra_certs_found:
try:
cert_full_path = config_provider.get_volume_path(EXTRA_CA_DIRECTORY, extra_cert_path)
with config_provider.get_volume_file(cert_full_path) as f:
certificate = load_certificate(f.read())
cert_views.append({
'path': extra_cert_path,
'names': list(certificate.names),
'expired': certificate.expired,
})
cert = config_provider.get_volume_path(EXTRA_CA_DIRECTORY, extra_cert_path)
certificate = load_certificate(cert)
cert_views.append({
'path': extra_cert_path,
'names': list(certificate.names),
'expired': certificate.expired,
})
except CertInvalidException as cie:
cert_views.append({
'path': extra_cert_path,