diff options
Diffstat (limited to 'lib/sqlalchemy/ext/hybrid.py')
-rw-r--r-- | lib/sqlalchemy/ext/hybrid.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sqlalchemy/ext/hybrid.py b/lib/sqlalchemy/ext/hybrid.py index 609f5aa8e..e0b3dab48 100644 --- a/lib/sqlalchemy/ext/hybrid.py +++ b/lib/sqlalchemy/ext/hybrid.py @@ -90,7 +90,7 @@ class property_(object): def __get__(self, instance, owner): if instance is None: - return util.update_wrapper(self.expr(owner), self) + return self.expr(owner) else: return self.fget(instance) @@ -135,6 +135,9 @@ class Comparator(interfaces.PropComparator): # interesting.... return self - - -
\ No newline at end of file + +def hybrid_and(self): + if isinstance(self, type): + return expression.and_ + else: + return operator.and_ |