Skip to content

Commit 292dc84

Browse files
authored
Merge pull request #139 from lsetiawan/fix_gr
Allow sfid to be None to work with older code
2 parents b572e29 + fcc9286 commit 292dc84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

odm2api/ODM2/services/readService.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ def getResults(self, ids=None, restype = None, uuids=None, actionid=None, simula
801801
warnings.warn('The parameter \'sfid\' is deprecated. '
802802
'Please use the sfids parameter instead and send in a list.',
803803
DeprecationWarning, stacklevel=2)
804-
query = query.join(FeatureActions).filter_by(SamplingFeatureID=kwargs['sfid'])
804+
if kwargs['sfid']:
805+
query = query.join(FeatureActions).filter_by(SamplingFeatureID=kwargs['sfid'])
805806
if sfids or sfcodes or sfuuids:
806807
sf_list = self.getSamplingFeatures(ids=sfids, codes=sfcodes, uuids=sfuuids)
807808
sfids = []

0 commit comments

Comments
 (0)