wcs: refer to blocks by slug, not url_name (#55213)
This commit is contained in:
parent
e134d93b86
commit
371e1cfa1e
|
@ -126,7 +126,7 @@ class Cmd(Command):
|
|||
# do not use import_from_xml to avoid autofixing url_name.
|
||||
blockdef = BlockDef.import_from_xml_tree(tree, include_id=False)
|
||||
try:
|
||||
existing_blockdef = BlockDef.get_by_urlname(blockdef.url_name)
|
||||
existing_blockdef = BlockDef.get_on_index(blockdef.slug, 'slug')
|
||||
except KeyError:
|
||||
blockdef.store(comment='Indus Initial Import')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue