chore(python): include error when wanting to upload a JSON file as a translation payload

[no changelog]
pull/3540/head
grdddj 4 months ago committed by Jiří Musil
parent a8beb03428
commit 8d1e002dfb

@ -224,6 +224,11 @@ def language(
language_data = b""
else:
assert path_or_url is not None
if path_or_url.endswith(".json"):
raise click.ClickException(
"Provided file is a JSON file, not a blob file.\n"
"Generate blobs by running `python core/translations/cli.py gen` in root."
)
try:
language_data = Path(path_or_url).read_bytes()
except Exception:

Loading…
Cancel
Save