Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
arthur-zzz
noc
Commits
93e64ae2
Commit
93e64ae2
authored
Nov 15, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/migrations/0222_managedobject_caps_field.py
View file @
93e64ae2
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment