bug fix, indexing empty slice

Signed-off-by: mohit kumar singh <mohitkumarsingh907@gmail.com>
This commit is contained in:
MohitKS5 2018-03-16 12:31:32 +05:30 committed by mohit kumar singh
parent 8a1f3195ca
commit 5e2fb7f51d

View file

@ -130,7 +130,7 @@ func (s *eventStateKeyStatements) bulkSelectEventStateKeyNID(
func (s *eventStateKeyStatements) bulkSelectEventStateKey(
ctx context.Context, eventStateKeyNIDs []types.EventStateKeyNID,
) (map[types.EventStateKeyNID]string, error) {
var nIDs pq.Int64Array
nIDs := make(pq.Int64Array, len(eventStateKeyNIDs))
for i := range eventStateKeyNIDs {
nIDs[i] = int64(eventStateKeyNIDs[i])
}