Skip to content

Commit

Permalink
Fixed issue redis#2598 - make Document class subscriptable
Browse files Browse the repository at this point in the history
  • Loading branch information
aksinha334 committed Mar 14, 2023
1 parent 6c708c2 commit aebd764
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions redis/commands/search/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ def __init__(self, id, payload=None, **fields):

def __repr__(self):
return f"Document {self.__dict__}"

def __getitem__(self, item):
return self.Document[item]

0 comments on commit aebd764

Please sign in to comment.