Fix an indexing error which caused FileSystemSource.get() to return

the oldest object instead of the newest.
master
Michael Chisholm 2018-11-01 19:54:54 -04:00
parent 9693c16cd1
commit 2b983368e5
1 changed files with 1 additions and 1 deletions

View File

@ -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