From 371e1cfa1e49d48e9da81a425e73fb63e680fd27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 28 Jun 2021 22:01:12 +0200 Subject: [PATCH] wcs: refer to blocks by slug, not url_name (#55213) --- wcs/imio_import_directory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcs/imio_import_directory.py b/wcs/imio_import_directory.py index 6380ff6..9acb22b 100644 --- a/wcs/imio_import_directory.py +++ b/wcs/imio_import_directory.py @@ -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: