Avoid potential KeyError in _is_versionable_type()

pull/1/head
Chris Lenk 2021-02-05 17:42:04 -05:00 committed by GitHub
parent 624d71ed53
commit 5971129b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ def _is_versionable_type(data):
# map to a registered class, and from that get a more complete
# picture of its properties.
cls = stix2.registry.class_for_type(data["type"], stix_version)
cls = stix2.registry.class_for_type(data.get("type"), stix_version)
if cls:
is_versionable = _VERSIONING_PROPERTIES.issubset(
cls._properties,