Skip to content

Commit 2f06a0d

Browse files
authored
Merge pull request #78 from billdodd/fix/issue-76
Show collection members even if optional prop not present
2 parents 120bde2 + 5cceb94 commit 2f06a0d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redfishtool/redfishtoolTransport.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1045,11 +1045,10 @@ def listCollection(self, rft, r, coll, prop=None):
10451045
# create a member dict. Always include Id and path
10461046
listMember={"Id": d["Id"], "@odata.id": d["@odata.id"] }
10471047
# if a property was specified to include, add it to the list dict
1048-
if( prop is not None ):
1048+
if( prop in d ):
10491049
listMember[prop]=propVal
1050-
# add the member to the listd
1051-
if (prop is None) or (propVal is not None):
1052-
members.append(listMember)
1050+
# add the member to the list
1051+
members.append(listMember)
10531052

10541053
#create base list dictionary
10551054
collPath=urlparse(baseUrl).path

0 commit comments

Comments
 (0)