Commit 862cc544 authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed bug in tag cleaning (clean ttl but not tags)

parent 2c449528
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -311,8 +311,8 @@ class ObjectsDB(object):

                for key, obj in self._objects.items():
                    if obj.get('__parent') is parent:
                        del self._objects[key]
                        self.clean_ttls(obj['id'])
                        del self._objects[key]
            else:
                raise ValueError('The object %r is not registered' % obj_id)

@@ -322,9 +322,11 @@ class ObjectsDB(object):
        '''

        with self._lock:
            obj = self.get_by_id(obj_id)
            for oid, tag in self._ttls.keys():
                if oid == obj_id:
                    del self._ttls[(oid, tag)]
                    del obj[tag]

    def get_ids(self):
        '''