diff --git a/asab/storage/mongodb.py b/asab/storage/mongodb.py index 90e09e14..fc37a1e2 100644 --- a/asab/storage/mongodb.py +++ b/asab/storage/mongodb.py @@ -196,10 +196,10 @@ async def execute(self, custom_data: typing.Optional[dict] = None, event_type: t if ret.get('_v') == 1 and '_c' not in ret: # If the object is new (version is 1), set the creation datetime await coll.update_one( - { id_name: ret[id_name] }, - { '$set': { '_c': ret['_m'] } } + {id_name: ret[id_name]}, + {'$set': {'_c': ret['_m']}} ) - + self.ObjId = ret[id_name] if self.Storage.WebhookURIs is not None: