src/pyams_sequence/sequence.py
changeset 38 f3acef84eef9
parent 13 b3d0c3b4c940
child 43 c348a83243fc
equal deleted inserted replaced
37:c464e51532cc 38:f3acef84eef9
    49 
    49 
    50 SEQUENCE_INFO_KEY = 'pyams_sequence.info'
    50 SEQUENCE_INFO_KEY = 'pyams_sequence.info'
    51 
    51 
    52 
    52 
    53 @adapter_config(context=ISequentialIdTarget, provides=ISequentialIdInfo)
    53 @adapter_config(context=ISequentialIdTarget, provides=ISequentialIdInfo)
    54 def SequentialIdInfoFactory(context):
    54 def sequential_id_info_factory(context):
    55     """Sequential ID info factory"""
    55     """Sequential ID info factory"""
    56     annotations = IAnnotations(context)
    56     annotations = IAnnotations(context)
    57     info = annotations.get(SEQUENCE_INFO_KEY)
    57     info = annotations.get(SEQUENCE_INFO_KEY)
    58     if info is None:
    58     if info is None:
    59         info = annotations[SEQUENCE_INFO_KEY] = SequentialIdInfo()
    59         info = annotations[SEQUENCE_INFO_KEY] = SequentialIdInfo()