-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove null (gap) to prevent validation errors #728
Conversation
If single and clip annotations are linked and are not touching each other, then null is added. When deleting the single frame annotation, delete also the null. Fix #488
There is still an error if I put the single-frame annotation before the multi-frame annotation. |
Check for null at array beginning and delete remaining gap filler
I found a related bug. |
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.
This works, thanks!
Could you please also fix this in this PR? |
Empty arrays represent gaps
This reverts commit b06f899.
@mzur you can check it out now. |
I have pushed the implementation of my idea and I still think it works. Can you please test it, too? |
@mzur it works. And now I understood what you meant. I was really confused before. Thanks! |
Sorry, I'll try to be more clear next time 😉 Do we still need the other change? If yes, please move it to the VideoAnnotation model. |
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.
Thanks! I'm sorry to drag this on even more but could you now please add a test for the new validation behavior? The test should be written in a way that would fail before the change and pass with the change.
What do you mean by that? The change is implemented within the model, so it is always tested if the array is empty or not. |
I would like to have a test like this one that checks the new behavior of validating an annotation with a gap. If the test would be executed before the changes of this PR, it should fail. After the changes of this PR, the test should pass. |
For me it sounds like, you want something like this. That is why I'm still confused, because the whole test will always fail.
|
I meant something like this: 16d1f2a Before your change, this would fail, although it is perfectly valid. We could even extend the validation so it checks that there are no consecutive empty arrays or there is a mismatch between the empty array position and the |
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.
All good now 👍
If single frame and clip annotations are linked and are not touching each other, then null is added. When deleting the single frame annotation, delete also the null.
Fix #488