From 72a4cbd3ddafaa54d33cb17800cd40ebfdc070d4 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Wed, 28 Jun 2017 22:42:11 -0700 Subject: [PATCH] Allow more flexible coersion from int to bool to fix unread perspective --- packages/client-app/src/flux/attributes/attribute-boolean.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client-app/src/flux/attributes/attribute-boolean.es6 b/packages/client-app/src/flux/attributes/attribute-boolean.es6 index ce0bf13eb..cb631be93 100644 --- a/packages/client-app/src/flux/attributes/attribute-boolean.es6 +++ b/packages/client-app/src/flux/attributes/attribute-boolean.es6 @@ -13,10 +13,10 @@ export default class AttributeBoolean extends Attribute { return val; } fromJSON(val) { - return ((val === 'true') || (val === 1) || (val === true)) || false; + return ((val === 'true') || (val / 1 >= 1) || (val === true)) || false; } fromColumn(val) { - return (val === 1) || false; + return (val >= 1) || false; } columnSQL() { const defaultValue = this.defaultValue ? 1 : 0;