You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating example_prison_data_product_metadata to add a retentionPeriod, I got this stacktrace:
[ERROR] KeyError: 'retentionPeriod'Traceback (most recent call last):
File "/var/task/update_metadata.py", line 42, in handler
new_version = version_creator.update_metadata(new_metadata) File "/var/task/versioning.py", line 98, in update_metadata
state = metadata_update_type(metadata) File "/var/task/versioning.py", line 135, in metadata_update_type
changed_fields = data_product_metadata.changed_fields() File "/var/task/data_product_metadata.py", line 245, in changed_fields
if new_version[field] == latest_version[field]:
| [ERROR] KeyError: 'retentionPeriod' Traceback (most recent call last):
File "/var/task/update_metadata.py", line 42, in handler
new_version = version_creator.update_metadata(new_metadata) File "/var/task/versioning.py", line 98, in update_metadata
state = metadata_update_type(metadata) File "/var/task/versioning.py", line 135, in metadata_update_type
changed_fields = data_product_metadata.changed_fields() File "/var/task/data_product_metadata.py", line 245, in changed_fields
if new_version[field] == latest_version[field]:
-- | --
This logic assumes the set of keys is always the same when updating the metadata, but this is not the case, since
the metadata schema can evolve
the user may add or remove fields that are optional in the schema
To Reproduce
Create a data product with minimal required fields
Update the data product to add a new field
Expected Behaviour
The metadata should be updated successfully and a new minor version created
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug.
When updating example_prison_data_product_metadata to add a
retentionPeriod
, I got this stacktrace:This logic assumes the set of keys is always the same when updating the metadata, but this is not the case, since
To Reproduce
Expected Behaviour
The metadata should be updated successfully and a new minor version created
Additional context
No response
The text was updated successfully, but these errors were encountered: