Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 21, 2024
1 parent 6d8cc2a commit 7ac7a84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/anemoi/registry/commands/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def entry_set_value(path, value):
entry_set_value("/metadata/updated", updated + 1)

if "constant_fields" in entry.record["metadata"] and "variables_metadata" in entry.record["metadata"]:
LOG.info("%s, setting `variables_metadata` and `constant_fields`")
LOG.info("%s, checking `variables_metadata` and `constant_fields`", name)
constants = entry.record["metadata"]["constant_fields"]
variables_metadata = entry.record["metadata"]["variables_metadata"]

Expand All @@ -178,6 +178,8 @@ def entry_set_value(path, value):
if changed:
entry_set_value("/metadata/variables_metadata", variables_metadata)
entry_set_value("/metadata/updated", updated + 1)
else:
LOG.info("No changes required")

if "variables_metadata" not in entry.record["metadata"] or args.force:
LOG.info("%s, setting `variables_metadata` πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯", name)
Expand Down

0 comments on commit 7ac7a84

Please sign in to comment.