iiif-prezi / iiif-prezi3

IIIF Presentation API 3 Python Library
https://iiif-prezi.github.io/iiif-prezi3/
Apache License 2.0
28 stars 14 forks source link

Setting some of the different AutoId types causes an error #123

Closed digitaldogsbody closed 1 year ago

digitaldogsbody commented 1 year ago

Expected behaviour:

Using the config pattern, I should be able to select the int-per-type AutoId config

Observed behaviour:

An AttributeError when trying to instantiate a new object: AttributeError: 'AutoId' object has no attribute '_type_translation'

Potential bug location(s):

https://github.com/iiif-prezi/iiif-prezi3/blob/main/iiif_prezi3/helpers/auto_fields.py#L85 https://github.com/iiif-prezi/iiif-prezi3/blob/main/iiif_prezi3/helpers/auto_fields.py#L94

Any other comments:

The AutoIdConfig class has a property called translation, and this is probably what is intended to be read (via self.config.translation, similar to the usage of the base_url property)