diff --git a/README.md b/README.md index ccc9f34..d00600e 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ e.g.,`handle.additional.prefixes = 11858, 11234, 11372, 11346, 20.500.12801, 20. ## !!!Migration notes:!!! - The values of table attributes that describe the last modification time of dspace object (for example attribute `last_modified` in table `Item`) have a value that represents the time when that object was migrated and not the value from migrated database dump. - If you don't have valid and complete data, not all data will be imported. +- check if license link contains XXX. This is of course unsuitable for production run! ## Check import consistency -Use `tools/repo_diff` utility, see [README](tools/repo_diff/README.md). \ No newline at end of file +Use `tools/repo_diff` utility, see [README](tools/repo_diff/README.md). diff --git a/src/pump/_license.py b/src/pump/_license.py index 936bf8b..87849d4 100644 --- a/src/pump/_license.py +++ b/src/pump/_license.py @@ -184,16 +184,21 @@ def update_license_def(env, lic_def_url: str): env_lic = env.get("licenses", {}) if "to_replace_def_url" not in env_lic: _logger.info( - "License def URL is not replaced, absolute path to the new repo must math the old one!") + "License def URL is not replaced, absolute" + "path to the new repo must match the old one!") return lic_def_url # Replace old site url to a new site url if env_lic["to_replace_def_url"] in lic_def_url: + if 'XXX' in env_lic['replace_with_def_url']: + _logger.warning(f"New license contains XXX and is probably misconfigured: " + f"{lic_def_url}") lic_def_url = lic_def_url.replace( env_lic["to_replace_def_url"], env_lic["replace_with_def_url"] ) - # File name has a missing `.html` suffix -> add that suffix to the end of the definition url + # File name has a missing `.html` suffix -> add that suffix + # to the end of the definition url lic_def_url += '.html' return lic_def_url