Replace allow_get check with allow_fetch
We got rid of all allow_get checks in the code and now can let SDK drop the attribute Change-Id: I61750cc491cf769b1daf42af2eca6b6199fa2b5d
This commit is contained in:
parent
58eff5e7f9
commit
650795af70
|
@ -723,10 +723,15 @@ def get_osc_show_columns_for_sdk_resource(
|
|||
columns
|
||||
"""
|
||||
|
||||
if getattr(sdk_resource, 'allow_get', None) is not None:
|
||||
if getattr(sdk_resource, 'allow_fetch', None) is not None:
|
||||
# OSC at the moment lands here with FakeResource objects which are not
|
||||
# 100% sdk compatible. Unless we introduce SDK test/fake resources we
|
||||
# should check presence of the specific method
|
||||
resource_dict = sdk_resource.to_dict(
|
||||
body=True, headers=False, ignore_none=False)
|
||||
else:
|
||||
# We might land here with not a real SDK Resource (during the
|
||||
# transition period).
|
||||
resource_dict = sdk_resource
|
||||
|
||||
# Build the OSC column names to display for the SDK resource.
|
||||
|
|
Loading…
Reference in New Issue