Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cobrakbase/core/kbaseobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, data=None, info=None, args=None, kbase_type=None, exclude_dic
:param exclude_dict:
"""
#If an object has a key "data", we need to replace it befor setting attributes to the data
data = data or {}
if "data" in data:
data["_data"] = data["data"]
del(data["data"])
Expand All @@ -39,8 +40,6 @@ def __init__(self, data=None, info=None, args=None, kbase_type=None, exclude_dic
# Turning all fields in the dictionary into attributes
if args is None:
args = {}
if data is None:
data = {}
self.__dict__ = data
self.exclude_dict = set()
if exclude_dict:
Expand Down