-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Add UidBone #1131
base: develop
Are you sure you want to change the base?
feat: Add UidBone #1131
Conversation
Some Points for the viur meeting
|
Co-authored-by: Sven Eberth <[email protected]>
mhh i have found an interesting bug. So if I call up a skel view in which this bone exists but it has not yet been written, a uid is automatically assigned but not written in the skel. This leads to the number not being used. |
Fixed by: 041da3b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked in my test, but I didn't any pentest. But tests in production are usually the best test anyways 😆
pattern = pattern() | ||
self.pattern = str(pattern) | ||
if self.pattern.count("*") != 1: | ||
raise ValueError("Only one Wildcard (*) is allowed in the pattern") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise ValueError("Only one Wildcard (*) is allowed in the pattern") | |
raise ValueError("Only one wildcard (*) is allowed and required in the pattern") |
if len(self.fillchar) != 1: | ||
raise ValueError("Only one char is allowed as fillchar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ValueError is also raised on an empty fillchar, which is the default. Is this wanted?
if not self.readOnly: | ||
self.readOnly = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you solve this differently? Default readOnly
flag shall be True, and changing it should raise a ValueError. The user should know that this bone can't be set readOnly=False
.
""" | ||
Initializes a new UidBone. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal for #1117