Skip to content

Commit e6a5d23

Browse files
don't panic if binding and no ephemeral ids were given
Signed-off-by: [email protected] <[email protected]>
1 parent aa0d270 commit e6a5d23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

platform/view/services/storage/driver/sql/postgres/binding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func newBindingStore(readDB, writeDB *sql.DB, table string) *BindingStore {
4242

4343
func (db *BindingStore) PutBindings(ctx context.Context, longTerm view.Identity, ephemeral ...view.Identity) error {
4444
if len(ephemeral) == 0 {
45-
return errors.New("no ephemeral identities provided")
45+
return nil
4646
}
4747

4848
logger.DebugfContext(ctx, "put bindings for %d ephemeral(s) with long term [%s]", len(ephemeral), longTerm.UniqueID())

platform/view/services/storage/driver/sql/sqlite/binding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func newBindingStore(readDB *sql.DB, writeDB common2.WriteDB, table string) *Bin
7676

7777
func (db *BindingStore) PutBindings(ctx context.Context, longTerm view.Identity, ephemeral ...view.Identity) error {
7878
if len(ephemeral) == 0 {
79-
return errors.New("no ephemeral identities provided")
79+
return nil
8080
}
8181

8282
logger.DebugfContext(ctx, "put bindings for %d ephemeral(s) with long term [%s]", len(ephemeral), longTerm.UniqueID())

0 commit comments

Comments
 (0)