diff options
Diffstat (limited to 'pyasn1/type/univ.py')
-rw-r--r-- | pyasn1/type/univ.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 898cf25..492a118 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -2347,7 +2347,9 @@ class SequenceAndSetBase(base.AbstractConstructedAsn1Item): if value is noValue: if componentTypeLen: - value = componentType.getTypeByPosition(idx).clone() + value = componentType.getTypeByPosition(idx) + if isinstance(value, base.AbstractConstructedAsn1Item): + value = value.clone(cloneValueFlag=componentType[idx].isDefaulted) elif currentValue is noValue: raise error.PyAsn1Error('Component type not defined') |