Fix FileSystemSource.get() to not look for the latest version of
an object when markings are queried, since markings are not versioned.revert-222-multi_version_filesystem_store
parent
9f83f2140b
commit
7bb3d1f6a6
|
@ -529,7 +529,12 @@ 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'])[-1]
|
||||
if is_marking(stix_id):
|
||||
# Markings are unversioned; there shouldn't be more than one
|
||||
# result.
|
||||
stix_obj = all_data[0]
|
||||
else:
|
||||
stix_obj = sorted(all_data, key=lambda k: k['modified'])[-1]
|
||||
else:
|
||||
stix_obj = None
|
||||
|
||||
|
|
Loading…
Reference in New Issue