From 32d09a3c01f5e5b837242674be8a4d0d591973bf Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Wed, 20 Jul 2016 11:23:39 -0700 Subject: [PATCH] Fix bug in evaluation logic. Bump version. --- ldclient/flag.py | 4 ++-- ldclient/version.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ldclient/flag.py b/ldclient/flag.py index a3cd8319..fb18b21b 100644 --- a/ldclient/flag.py +++ b/ldclient/flag.py @@ -133,7 +133,7 @@ def _clause_matches_user(clause, user): for u in u_value: if _match_any(op_fn, u, clause.get('values') or []): return _maybe_negate(clause, True) - return _maybe_negate(clause, True) + return _maybe_negate(clause, False) else: return _maybe_negate(clause, _match_any(op_fn, u_value, clause.get('values') or [])) @@ -146,6 +146,6 @@ def _match_any(op_fn, u, vals): def _maybe_negate(clause, val): - if clause.get('negate', False): + if clause.get('negate', False) is True: return not val return val diff --git a/ldclient/version.py b/ldclient/version.py index 21014090..527957b2 100644 --- a/ldclient/version.py +++ b/ldclient/version.py @@ -1 +1 @@ -VERSION = "2.0.0" +VERSION = "2.0.0-beta2" diff --git a/setup.py b/setup.py index 1094fa70..9a00cc58 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ def run(self): setup( name='ldclient-py', - version='2.0.0', + version='2.0.0-beta2', author='Catamorphic Co.', author_email='team@catamorphic.com', packages=['ldclient'],