Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Commit

Permalink
Make default_values work with CollectionView.create (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pior Bastida committed Dec 17, 2012
1 parent 32e2f33 commit e1f140a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyramid_rest/mongo.py
Expand Up @@ -81,7 +81,6 @@ def mongo_db(request):


def begin_request(event):
""""""
event.request.mongo_connection.start_request()
event.request.add_finished_callback(end_request)

Expand Down Expand Up @@ -132,7 +131,8 @@ def index(self, **identifiers):
return {'data': list(self.collection.find(parent_ids))}

def create(self, **identifiers):
document = self.document_cls(doc=self.request.POST)
document = self.document_cls()
document.update(self.request.POST)
for k, v in self._get_ids_dict(identifiers).iteritems():
document[k] = v
try:
Expand Down

0 comments on commit e1f140a

Please sign in to comment.