From e994fa6a8a55d728f734699a500a604b85916123 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Wed, 17 Jul 2013 15:51:41 -0700 Subject: [PATCH] Properly distinguish JSON parse errors from empty values. --- r2/r2/lib/validator/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/validator/validator.py b/r2/r2/lib/validator/validator.py index 233a83d15..0fdfdeb7b 100644 --- a/r2/r2/lib/validator/validator.py +++ b/r2/r2/lib/validator/validator.py @@ -2265,7 +2265,7 @@ class VValidatedJSON(VJSON): def run(self, json_str): data = VJSON.run(self, json_str) - if not data: + if self.has_errors: return # Note: this relies on the fact that all validator errors are dumped