Skip to content

Commit f116416

Browse files
author
Hayim.Shaul@ibm.com
committed
check for nil longTerm id
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
1 parent b5b79cd commit f116416

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func (db *BindingStore) PutBindings(ctx context.Context, longTerm view.Identity,
4444
if len(ephemerals) == 0 {
4545
return nil
4646
}
47+
if longTerm == nil {
48+
return nil
49+
}
4750

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func (db *BindingStore) PutBindings(ctx context.Context, longTerm view.Identity,
4444
if len(ephemeral) == 0 {
4545
return nil
4646
}
47+
if longTerm == nil {
48+
return nil
49+
}
4750

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

0 commit comments

Comments
 (0)