Fix an indexing error which caused FileSystemSource.get() to return
the oldest object instead of the newest.master
parent
9693c16cd1
commit
2b983368e5
|
@ -529,7 +529,7 @@ class FileSystemSource(DataSource):
|
||||||
all_data = self.all_versions(stix_id, version=version, _composite_filters=_composite_filters)
|
all_data = self.all_versions(stix_id, version=version, _composite_filters=_composite_filters)
|
||||||
|
|
||||||
if all_data:
|
if all_data:
|
||||||
stix_obj = sorted(all_data, key=lambda k: k['modified'])[0]
|
stix_obj = sorted(all_data, key=lambda k: k['modified'])[-1]
|
||||||
else:
|
else:
|
||||||
stix_obj = None
|
stix_obj = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue