Skip to content

Commit

Permalink
Fixed django#373 - Add ColPairs.__repr__.
Browse files Browse the repository at this point in the history
  • Loading branch information
csirmazbendeguz committed Aug 26, 2024
1 parent 7841c5e commit 615cb59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions django/db/models/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,10 @@ def __len__(self):
def __iter__(self):
return iter(self.get_cols())

def __repr__(self):
cols = ", ".join(repr(col) for col in self.get_cols())
return "{}({})".format(self.__class__.__name__, cols)

def get_cols(self):
return [
Col(self.alias, target, source)
Expand Down

0 comments on commit 615cb59

Please sign in to comment.