forked from TrueCloudLab/certificates
Remove special case for empty slices
This commit is contained in:
parent
ef16febf40
commit
c0eb420806
1 changed files with 0 additions and 11 deletions
|
@ -387,10 +387,6 @@ func (db *DB) addEAKID(ctx context.Context, provisionerID, eakID string) error {
|
|||
_new interface{} = newEAKIDs
|
||||
)
|
||||
|
||||
if len(eakIDs) == 0 {
|
||||
_old = nil
|
||||
}
|
||||
|
||||
if err = db.save(ctx, provisionerID, _new, _old, "externalAccountKeysByProvisionerID", externalAccountKeysByProvisionerIDTable); err != nil {
|
||||
return errors.Wrapf(err, "error saving eakIDs index for provisioner %s", provisionerID)
|
||||
}
|
||||
|
@ -420,13 +416,6 @@ func (db *DB) deleteEAKID(ctx context.Context, provisionerID, eakID string) erro
|
|||
_new interface{} = newEAKIDs
|
||||
)
|
||||
|
||||
switch {
|
||||
case len(eakIDs) == 0:
|
||||
_old = nil
|
||||
case len(newEAKIDs) == 0:
|
||||
_new = nil
|
||||
}
|
||||
|
||||
if err = db.save(ctx, provisionerID, _new, _old, "externalAccountKeysByProvisionerID", externalAccountKeysByProvisionerIDTable); err != nil {
|
||||
return errors.Wrapf(err, "error saving referenceIDs index for provisioner %s", provisionerID)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue