diff --git a/pillarsdk/projects.py b/pillarsdk/projects.py index 6863dfd..601e840 100644 --- a/pillarsdk/projects.py +++ b/pillarsdk/projects.py @@ -51,19 +51,16 @@ class Project(List, Find, Create, Post, Update, Delete, Replace): api = api or self.api attributes = attributes or self.to_dict() etag = attributes['_etag'] - attributes.pop('_id') - attributes.pop('_etag') - attributes.pop('_created', None) - attributes.pop('_updated', None) - attributes.pop('_links', None) - attributes.pop('_deleted', None) 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: attributes[prop] = attributes[prop]['_id'] # Remove None attributes attributes = utils.remove_none_attributes(attributes) + attributes = utils.remove_private_keys(attributes) + url = utils.join_url(self.path, str(self['_id'])) headers = utils.merge_dict( self.http_headers(),