Skip to content

Commit

Permalink
Merge pull request #365 from arturaz/issue/364
Browse files Browse the repository at this point in the history
Fix: hmGet throws an exception if one of the keys doesn't have a value
  • Loading branch information
gvolpe authored Sep 15, 2020
2 parents c982ee5 + 01d55ef commit dfd5d76
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ private[redis4cats] class BaseRedis[F[_]: Concurrent: ContextShift, K, V](
async
.flatMap(c => F.delay(c.hmget(key, fields: _*)))
.futureLift
.map(_.asScala.toList.map(kv => kv.getKey -> kv.getValue).toMap)
.map(_.asScala.toList.collect { case kv if kv.hasValue => kv.getKey -> kv.getValue }.toMap)

override def hKeys(key: K): F[List[K]] =
async
Expand Down

0 comments on commit dfd5d76

Please sign in to comment.