Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix no put_detector_data do mongo_storage #44

Merged
merged 1 commit into from

2 participants

@nossal

No método put_detector_data do módulo thumbor.storages.mongo_storage, a chamada para o método update do pymongo tinha apenas um parâmetro, sendo que o necessário são no mínimo dois (segundo a versão 2.0.1).

@heynemann heynemann merged commit c45eef3 into thumbor:master
@heynemann
Owner

VLWWWW! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 12, 2011
  1. Fixed update detector data in mongodb storage

    Rodrigo Nossal authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 thumbor/storages/mongo_storage.py
View
4 thumbor/storages/mongo_storage.py
@@ -64,9 +64,7 @@ def put_crypto(self, path):
def put_detector_data(self, path, data):
connection, db, storage = self.__conn__()
- doc = storage.find_one({'path': path})
- doc['detector_data'] = data
- storage.update(doc)
+ storage.update({'path': path}, {"$set": {"detector_data": data}})
def get_crypto(self, path):
connection, db, storage = self.__conn__()
Something went wrong with that request. Please try again.