Skip to content

Commit 0744e97

Browse files
anthonycorlabkey-nicka
authored andcommitted
experiment.py Fix lsid serialization (#6)
Don't serialize lsid when it is None
1 parent 2a37952 commit 0744e97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

labkey/experiment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def __init__(self, **kwargs):
162162
def to_json(self):
163163
data = {
164164
# 'id': self.id,
165-
'lsid': self.lsid,
166165
'comment': self.comment,
167166
'name': self.name,
168167
'created': self.created,
@@ -171,6 +170,9 @@ def to_json(self):
171170
'modifiedBy': self.modified_by,
172171
'properties': self.properties
173172
}
173+
if self.lsid is not None:
174+
data.update({'lsid': self.lsid})
175+
174176
return data
175177

176178

0 commit comments

Comments
 (0)