File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,14 @@ def list_resources(self, parent=None):
142
142
try :
143
143
rel_href_pairs = iter (obj )
144
144
except TypeError :
145
- logger .error ("not iterable obj :" )
146
- pprint (obj )
145
+ logger .error ("unable to list resources on parent object (missing ['_meta']['links']) :" )
146
+ pprint (parent )
147
147
raise
148
148
resources_dict = {}
149
149
for res in rel_href_pairs :
150
150
resources_dict [res ['rel' ]] = res ['href' ]
151
- resources_dict ['href' ] = safe_get (parent , '_meta' , 'href' ) # save url to parent itself
151
+ # save url to parent itself if available, otherwise save 'href': None
152
+ resources_dict ['href' ] = safe_get (parent , '_meta' , 'href' )
152
153
parent [key ] = resources_dict # cache for future use
153
154
return parent [key ]
154
155
You can’t perform that action at this time.
0 commit comments