From aac4922376f0f6258725e468a3294b7b362a9832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 27 Oct 2016 09:29:49 +0200 Subject: [PATCH] Fix crash when project has no allowed_methods property --- pillarsdk/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillarsdk/projects.py b/pillarsdk/projects.py index b55f677..4dfd1d1 100644 --- a/pillarsdk/projects.py +++ b/pillarsdk/projects.py @@ -57,7 +57,7 @@ class Project(List, Find, Create, Post, Update, Delete, Replace): attributes.pop('_updated', None) attributes.pop('_links', None) attributes.pop('_deleted', None) - attributes.pop('allowed_methods') + attributes.pop('allowed_methods', None) # Strip embedded image file properties and revert to ObjectId for prop in ['picture_square', 'picture_header']: if prop in attributes and type(attributes[prop]) is dict: