diff --git a/stix2/v20/common.py b/stix2/v20/common.py index ecc93b1..19c43d8 100644 --- a/stix2/v20/common.py +++ b/stix2/v20/common.py @@ -15,16 +15,16 @@ from ..utils import NOW, _get_dict def _should_set_millisecond(cr, marking_type): - if marking_type == TLPMarking: + if marking_type == TLPMarking: + return True + if type(cr) == str: + if '.' in cr: return True - if type(cr) == str: - if '.' in cr: - return True - else: - return False - if cr.precision == 'millisecond': - return True - return False + else: + return False + if cr.precision == 'millisecond': + return True + return False class ExternalReference(_STIXBase): diff --git a/stix2/v21/common.py b/stix2/v21/common.py index 4b13def..ca97597 100644 --- a/stix2/v21/common.py +++ b/stix2/v21/common.py @@ -1,7 +1,6 @@ """STIX 2.1 Common Data Types and Properties.""" from collections import OrderedDict -import copy from ..base import _STIXBase from ..custom import _custom_marking_builder @@ -14,6 +13,7 @@ from ..properties import ( ) from ..utils import NOW, _get_dict + class ExternalReference(_STIXBase): # TODO: Add link """For more detailed information on this object's properties, see