diff --git a/parsers/caves.py b/parsers/caves.py index 5b6d674..4607b22 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -648,18 +648,18 @@ def read_cave(filename, cave=None): print(message) primary = False - def check_slug(areacode, kataster_number, unofficial_number): + def check_slug(areacode, kataster_number, unofficial_number, url): if kataster_number: if slug == f"{areacode}-{kataster_number}": return - message = f" ! Cave Slug incorrect (kataster): '{slug}' != '{areacode}-{kataster_number}' in file {filename}" + message = f" ! Cave Slug incorrect (kataster): '{slug}' != '{areacode}-{kataster_number}' {url=} in file {filename}" else: if slug == f"{areacode}-{unofficial_number}": return - message = f" ! Cave Slug incorrect (unofficial): '{slug}' != '{areacode}-{unofficial_number}' in file {filename}" + message = f" ! Cave Slug incorrect (unofficial): '{slug}' != '{areacode}-{unofficial_number}' {url=} in file {filename}" if slug.lower() == f"{areacode}-{unofficial_number.lower()}": - message = f" ! Cave Slug capitalisation incorrect (unofficial): {slug} != {areacode}-{unofficial_number} in file {filename}" - DataIssue.objects.create(parser="caves", message=message, url=f"{cave.url}_cave_edit/") + message = f" ! Cave Slug capitalisation incorrect (unofficial): '{slug}' != '{areacode}-{unofficial_number}' {url=} in file {filename}" + DataIssue.objects.create(parser="caves", message=message, url=f"{cave.slug}_cave_edit/") print(message) global entrances_xslug @@ -773,7 +773,7 @@ def read_cave(filename, cave=None): cave.description_file=description_file[0] cave.url=url[0] - check_slug(cave.areacode,cave.kataster_number, cave.unofficial_number) + check_slug(cave.areacode,cave.kataster_number, cave.unofficial_number, cave.url) entrances = getXML(cavecontents, "entrance", context=context) do_entrances()