Skip to content

Comments

Fix photo widget validation#878

Open
harminius wants to merge 4 commits intomasterfrom
fix-photo-widget-validation
Open

Fix photo widget validation#878
harminius wants to merge 4 commits intomasterfrom
fix-photo-widget-validation

Conversation

@harminius
Copy link
Contributor

@harminius harminius commented Feb 23, 2026

Fixes https://github.com/MerginMaps/server-private/issues/3230

Core issue: KeyErrorin validations when Data Driven Override is FieldBasedProperty. When Data driven override is enabled we assume there has to be an expression. However, it is also possible to set field based override.

Field: 'Thumbnail_link'
------------------------------
{'DocumentViewer': 2,
 'DocumentViewerHeight': 0,
 'DocumentViewerWidth': 0,
 'FileWidget': False,
 'FileWidgetButton': True,
 'FileWidgetFilter': '',
 'FullUrl': True,
 'PropertyCollection': {'name': NULL,
                        'properties': {'propertyRootPath': {'active': True,
                                                            'expression': '"Thumbnail_link"',
                                                            'type': 3},
                                       'storageUrl': {'active': True,
                                                      'field': 'Thumbnail_link',
                                                      'type': 2}},
                        'type': 'collection'},
 'RelativeStorage': 0,
 'StorageAuthConfigId': NULL,
 'StorageMode': 0,
 'StorageType': NULL,
 'UseLink': True}

- get the properties safely so it does not fail for KeyError
- extend the validation with FieldBasedProperty
-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants