Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model._string_constraints: don't overwrite existing attributes in case of a conflict #152

Conversation

jkhsjdhjs
Copy link
Contributor

@jkhsjdhjs jkhsjdhjs commented Nov 3, 2023

Currently a string constraints decorator silently overwrites existing attributes in case of a naming conflict. This behavior is changed such that the decorator checks for existing attributes beforehand and raises an exception in case of a conflict.
Futhermore, tests for this behavior are added.

I noticed this problem when reviewing #149. There, the decorator for Entity.global_asset_id currently overwrites the global_asset_id property, resulting in the constraints not being checked properly. A fix for this is currently in the making.

…e of a conflict

Currently a string constraints decorator silently overwrites existing
attributes in case of a naming conflict. This behavior is changed such
that the decorator checks for existing attributes beforehand and raises
an exception in case of a conflict.
Futhermore, tests for this behavior are added.
Copy link
Contributor

@zrgt zrgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s-heppner s-heppner merged commit bc2ff75 into eclipse-basyx:improve/V30 Nov 14, 2023
6 checks passed
@s-heppner s-heppner deleted the fix/string_constraints_name_conflict_handling branch November 14, 2023 12:33
@s-heppner s-heppner added the v3.0 label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants