fix: enc outputs *id001 in class/environment
- the slice notation [:] creates a shallow copy of the list - when dumping the data, it will not use the anchors and aliases because it treats the values in enc_role and classes as separate lists
This commit is contained in:
parent
ec3f431b45
commit
814b4e59b4
4
enc.py
4
enc.py
@ -34,11 +34,11 @@ def main():
|
|||||||
|
|
||||||
# Add 'enc_role' parameter with classes data
|
# Add 'enc_role' parameter with classes data
|
||||||
if "classes" in data:
|
if "classes" in data:
|
||||||
data["parameters"]["enc_role"] = data["classes"]
|
data["parameters"]["enc_role"] = data["classes"][:]
|
||||||
|
|
||||||
# Copy the environment to the parameters, if it exists
|
# Copy the environment to the parameters, if it exists
|
||||||
if data.get("environment"):
|
if data.get("environment"):
|
||||||
data["parameters"]["enc_env"] = data["environment"]
|
data["parameters"]["enc_env"] = data["environment"][:]
|
||||||
|
|
||||||
# If the environment is 'testing', remove it
|
# If the environment is 'testing', remove it
|
||||||
if data.get("environment") == "testing":
|
if data.get("environment") == "testing":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user