lazy: add support for __radd__ ("foo" + form_var_bla) (#29951)

This commit is contained in:
Frédéric Péters 2019-04-16 10:49:36 +02:00
parent a481797540
commit 653db00150
1 changed files with 3 additions and 0 deletions

View File

@ -421,6 +421,9 @@ class LazyFieldVar(object):
def __add__(self, other):
return self.get_value().__add__(other)
def __radd__(self, other):
return other + self.get_value()
def __mul__(self, other):
return self.get_value().__mul__(other)