Fix a bug with inventory.variables

Using Page[key] instead of Page.json[key] causes inner json blob
strings to automatically get parsed, which is not what we want with
this field.
This commit is contained in:
Jeff Bradberry 2020-03-27 11:06:32 -04:00
parent 30a3e3e172
commit a1f7d0b781

View File

@ -102,8 +102,9 @@ class ApiV2(base.Base):
return None
try:
# Note: doing asset[key] automatically parses json blob strings, which can be a problem.
fields = {
key: asset[key] for key in options
key: asset.json[key] for key in options
if key in asset.json and key not in asset.related
}
fields['natural_key'] = get_natural_key(asset)