From b1d525b015cb3b45c1de50b7f153690d6809036b Mon Sep 17 00:00:00 2001 From: Scoder12 <34356756+Scoder12@users.noreply.github.com> Date: Mon, 10 Aug 2020 15:10:03 -0700 Subject: [PATCH] Add do_raise to AsyncJSONKey __slots__ --- src/replit/database/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/replit/database/__init__.py b/src/replit/database/__init__.py index 5e205b0..d17c29c 100644 --- a/src/replit/database/__init__.py +++ b/src/replit/database/__init__.py @@ -20,7 +20,7 @@ class AsyncJSONKey: you don't have to do it manually. """ - __slots__ = ("db", "key", "dtype", "get_default", "discard_bad_data") + __slots__ = ("db", "key", "dtype", "get_default", "discard_bad_data", "do_raise") def __init__( self, @@ -350,6 +350,8 @@ class JSONKey(AsyncJSONKey): do_raise=do_raise, ) + _error = _async2sync(AsyncJSONKey._error) + _should_discard_prompt = _async2sync(AsyncJSONKey._should_discard_prompt) get = _async2sync(AsyncJSONKey.get) set = _async2sync(AsyncJSONKey.set)