Skip to content

Conversation

RustyNova016
Copy link
Contributor

Summary

Implemented a trigger to prevent inserting a tag parent that will result in a tag being its own parent.

Right now, the trigger is tested, but not the actual migration (VScode tunnels can't tunnel QT apps sadly...), so if someone want to test before I get to it, feel free to do so

close: #1074

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

"""Add a trigger to prevent having a tag being its own parent"""
add_trigger = text(
"""
CREATE TRIGGER `trigger_before_insert_tag_parents` BEFORE INSERT ON `tag_parents` BEGIN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Forgot FOR EACH ROW...

And updates

@CyanVoxel CyanVoxel added Type: Refactor Code that needs to be restructured or cleaned up TagStudio: Library Relating to the TagStudio library system labels Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TagStudio: Library Relating to the TagStudio library system Type: Refactor Code that needs to be restructured or cleaned up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Tags Can Be Parented to Each Other and Freeze the Program [#875 Regression]
2 participants