Commit 93e64ae2 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'fix-avs-caps-migration' into 'master'

Fix caps migration typo.

See merge request noc/noc!5871
parents f0e275c8 2269e6f9
......@@ -38,6 +38,9 @@ class Migration(BaseMigration):
objects_map = defaultdict(set)
caps_coll = self.mongo_db["noc.sa.objectcapabilities"]
for caps in caps_coll.find({"caps": {"$exists": True}}):
if isinstance(caps["_id"], bson.ObjectId):
# Old migrations is not completed
continue
oc = orjson.dumps(
sorted(caps["caps"], key=operator.itemgetter("capability")),
default=default,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment