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
def to_dict(self) -> Dict:
"""
Select metadata fields and make a new dict.
Returns: dict
"""
from idmtools.core.context import get_current_platform
result = dict()
metadata_fields = self.metadata_fields
platform = get_current_platform()
for f in fields(self):
if not f.name.startswith("_") and f.name not in ['parent']:
try:
from idmtools_platform_comps.comps_platform import COMPSPlatform
if isinstance(platform, COMPSPlatform):
if f.name in metadata_fields:
result[f.name] = getattr(self, f.name)
else:
result[f.name] = f.default
else:
result[f.name] = getattr(self, f.name)
except ImportError:
result[f.name] = getattr(self, f.name)
return result
Note: we should remove COMPSPlatform dependency!
The text was updated successfully, but these errors were encountered:
File: idmtools_core/idmtools/entities/itask.py
Note: we should remove COMPSPlatform dependency!
The text was updated successfully, but these errors were encountered: