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
Expected Behavior
.get_sla_objects to return all objects from sla
Current Behavior
returns dictionary of {name:id}. objects with the same name are skipped.
Failure Information (for bugs)
When we have a lot of objects with the same name for example "master" database in mssql_db objects .get_sla_objects appends the results in the dictionary and repeating keys will be overwritten and only objects with unique names get returned.
Steps to Reproduce
have 2 objects with same name, (in my case to containers of an mssql database "master"= within the same SLA.
query .get_sla_objects , only one "master" object will be returned.
The text was updated successfully, but these errors were encountered:
This is happening because it's a dictionary.
The keys will be unique. If you're adding new key-value pair to a dictionary which already has the key, it will just update the existing value for that particular key. That's the nature of dictionary.
Well yeah the keys will be unique but you wont be able get them all with this function when you have matching names due to, as you said, nature of dictionary.
I rewrote the function for myself using the ID as key so I could get ALL the objects in the SLA not just the ones with a unique name as key.
Expected Behavior
.get_sla_objects to return all objects from sla
Current Behavior
returns dictionary of {name:id}. objects with the same name are skipped.
Failure Information (for bugs)
When we have a lot of objects with the same name for example "master" database in mssql_db objects .get_sla_objects appends the results in the dictionary and repeating keys will be overwritten and only objects with unique names get returned.
Steps to Reproduce
have 2 objects with same name, (in my case to containers of an mssql database "master"= within the same SLA.
query .get_sla_objects , only one "master" object will be returned.
The text was updated successfully, but these errors were encountered: