diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-10-01 10:23:49 +0200 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-10-01 10:23:49 +0200 |
commit | 148e3d412f4cc8e6632a95741a457383b3ca852e (patch) | |
tree | 22a812a2d64c73efb8af678088777390ad5df92c /src/db.py | |
parent | cb47680777b3fd3bcd955f9e81ddf45c9b69ecfa (diff) | |
parent | f3204eecc33c60289ea0c2117ed3316beb59cde5 (diff) |
Fixed conflict.
Diffstat (limited to 'src/db.py')
-rwxr-xr-x | src/db.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -46,18 +46,18 @@ class DictDB(): return self._ts def add(self, data, batch_write=False): - key = str(self.unique_key()) + keys = [] if type(data) is list: for item in data: - item['_id'] = str(self._ts) + item['_id'] = str(self.unique_key()) self.couchdb.save(item) else: - data['_id'] = str(self._ts) + data['_id'] = str(self.unique_key()) self.couchdb.save(data) - return key + return keys def get(self, key): return self.couchdb[key] |