From 24ba1b0573e0e6ab0c52d07cd1716437df178974 Mon Sep 17 00:00:00 2001 From: Marc Nijdam Date: Sat, 25 Feb 2017 11:08:58 -0800 Subject: [PATCH] Don't pop attributes on resource creation Since the attribute dictionary can be shared across multiple instantiation calls we can't pop it during creation since we don't technically own those attributes. We leave the relationships pop alone for now since we haven't found a case where that is shared quite yet. --- helium/resource.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium/resource.py b/helium/resource.py index 612a948..e35b643 100644 --- a/helium/resource.py +++ b/helium/resource.py @@ -348,7 +348,7 @@ def _update_attributes(self, json): # promote id self.id = json.get('id', None) # promote all top level attributes - for (k, v) in iteritems(json.pop('attributes', {})): + for (k, v) in iteritems(json.get('attributes', {})): self._promote_json_attribute(k, v) # process includes if specified if self._include is not None: