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

the oldest object instead of the newest.
revert-222-multi_version_filesystem_store
Michael Chisholm 2018-11-01 19:54:54 -04:00
parent e2d9325356
commit e2f5d60b51
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)
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:
stix_obj = None