Skip to content

Commit e54f731

Browse files
authored
RED-21827, Fix bug in pipeline: watch command would fail on hashmaps key (#1)
1 parent ae56708 commit e54f731

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mockredis/pipeline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ def watch(self, *keys):
3939
raise RedisError("Cannot issue a WATCH after a MULTI")
4040
self.watching = True
4141
for key in keys:
42+
if key in self._watched_keys:
43+
continue
4244
self._watched_keys[key] = deepcopy(self.mock_redis.redis.get(self.mock_redis._encode(key))) # noqa
4345

4446
def multi(self):

0 commit comments

Comments
 (0)