Skip to content

Commit

Permalink
FIX: Towards mongodb, changed the way empty stuff is added;
Browse files Browse the repository at this point in the history
Fixed order with which traj is marked stored;
  • Loading branch information
SmokinCaterpillar committed May 17, 2016
1 parent 89f5b8b commit e8ef1d8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -54,7 +54,6 @@ before_install:
# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy scipy
- source activate test-environment
- pip freeze


install:
Expand Down Expand Up @@ -90,6 +89,7 @@ install:
- echo "+++++++++++ Installing PYPET unless coverage +++++++++++"
- if [[ $COVERAGE == OFF ]]; then travis_retry python setup.py install; fi
- echo "+++++++++++ FINISHED INSTALL +++++++++++"
- pip freeze


# Script command for all tests
Expand Down
2 changes: 1 addition & 1 deletion pypet/backends/mongodb.py
Expand Up @@ -908,7 +908,7 @@ def _srvc_update_db(self, entry, _id, how='$setOnInsert', upsert=True):
if entry:
add = {how: entry}
else:
add = {'$set':{'_id': _id}}
add = {how: {'_': '_'}}
u = pymongo.UpdateOne({'_id': _id}, add, upsert=upsert)
self._bulk.append(u)
if len(self._bulk) > self._max_bulk_length:
Expand Down
2 changes: 0 additions & 2 deletions pypet/storageservice.py
Expand Up @@ -2484,8 +2484,6 @@ def _trj_store_trajectory(self, traj, only_init=False, store_data=pypetconstants
name=self._trajectory_name,
title=self._trajectory_name,
filters=self._all_get_filters())
traj._stored = True

# Store meta information
self._trj_store_meta_data(traj)

Expand Down

0 comments on commit e8ef1d8

Please sign in to comment.