From 87f0e815c14ea187df82e4f343fdddf642f8be9b Mon Sep 17 00:00:00 2001 From: "Philip I. Thomas" Date: Sat, 2 Apr 2016 16:16:11 -0700 Subject: [PATCH] oops - some are instantiated --- staffjoy/resource.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/staffjoy/resource.py b/staffjoy/resource.py index 80be980..d66ac6e 100644 --- a/staffjoy/resource.py +++ b/staffjoy/resource.py @@ -74,7 +74,7 @@ def get_all(cls, parent=None, **params): r = requests.get(base_obj._url(), auth=(base_obj.key, ""), params=params) - time.sleep(self.REQUEST_SLEEP) + time.sleep(cls.REQUEST_SLEEP) if r.status_code not in cls.TRUTHY_CODES: return base_obj._handle_request_exception(r) @@ -176,7 +176,7 @@ def create(cls, parent=None, **kwargs): obj = cls(key=parent.key, route=route, config=parent.config) response = requests.post(obj._url(), auth=(obj.key, ""), data=kwargs) - time.sleep(self.REQUEST_SLEEP) + time.sleep(cls.REQUEST_SLEEP) if response.status_code not in cls.TRUTHY_CODES: return cls._handle_request_exception(response)