Merge pull request #1069 from Netflix/pending_fix
comments on alembic changes. resolve invalid usage of log_service.create
This commit is contained in:
commit
59ce586ea4
|
@ -270,7 +270,7 @@ class CertificatesList(AuthenticatedResource):
|
|||
cert = service.create(**data)
|
||||
if isinstance(cert, Certificate):
|
||||
# only log if created, not pending
|
||||
log_service.create(g.user, 'create_cert', 'OK', certificate=cert)
|
||||
log_service.create(g.user, 'create_cert', certificate=cert)
|
||||
return cert
|
||||
|
||||
return dict(message="You are not authorized to use the authority: {0}".format(data['authority'].name)), 403
|
||||
|
|
|
@ -18,6 +18,7 @@ session = db.session()
|
|||
|
||||
|
||||
def upgrade():
|
||||
print("Querying for all entries in certificate_notification_associations.")
|
||||
# Query for all entries in table
|
||||
results = session.query(certificate_notification_associations).with_entities(
|
||||
certificate_notification_associations.c.certificate_id,
|
||||
|
@ -30,6 +31,7 @@ def upgrade():
|
|||
for x in results:
|
||||
# If we've seen a pair already, delete the duplicates
|
||||
if seen.get("{}-{}".format(x.certificate_id, x.notification_id)):
|
||||
print("Deleting duplicate: {}".format(x))
|
||||
d = session.query(certificate_notification_associations).filter(certificate_notification_associations.c.id==x.id)
|
||||
d.delete(synchronize_session=False)
|
||||
seen["{}-{}".format(x.certificate_id, x.notification_id)] = True
|
||||
|
|
|
@ -27,8 +27,10 @@ def upgrade():
|
|||
TABLE,
|
||||
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True)
|
||||
)
|
||||
|
||||
db.session.commit()
|
||||
db.session.flush()
|
||||
|
||||
def downgrade():
|
||||
op.drop_column(TABLE, "id")
|
||||
|
||||
db.session.commit()
|
||||
db.session.flush()
|
||||
|
|
|
@ -258,8 +258,7 @@ class DigiCertIssuerPlugin(IssuerPlugin):
|
|||
"""Wrap the Digicert Issuer API."""
|
||||
title = 'DigiCert'
|
||||
slug = 'digicert-issuer'
|
||||
description = "Enables the creation of certificates by"
|
||||
"the DigiCert REST API."
|
||||
description = "Enables the creation of certificates by the DigiCert REST API."
|
||||
version = digicert.VERSION
|
||||
|
||||
author = 'Kevin Glisson'
|
||||
|
|
Loading…
Reference in New Issue