-
Notifications
You must be signed in to change notification settings - Fork 35
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
🐛 Exclude virtual tags from writing/updating #495
Conversation
api/application.go
Outdated
r.WithSourcedTags(archetypeTags, "archetype") | ||
r.WithSourcedTags(resolver.AssessmentTags(), "assessment") | ||
r.WithVirtualTags(archetypeTags, "archetype") | ||
r.WithVirtualTags(resolver.AssessmentTags(), "assessment") |
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.
Did you mean to use new the const here ^^ and below vv?
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.
I did, thanks for pointing that out.
migration/v9/model/archetype.go
Outdated
CriteriaTags []Tag `gorm:"many2many:ArchetypeCriteriaTags"` | ||
Tags []Tag `gorm:"many2many:ArchetypeTags"` | ||
CriteriaTags []Tag `gorm:"many2many:ArchetypeCriteriaTags;constraint:OnDelete:CASCADE"` | ||
Tags []Tag `gorm:"many2many:ArchetypeTags;constraint:OnDelete:CASCADE"` |
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.
I assume this fixes archetype delete.
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 already exists on main so I'm not sure why it's showing up separately. I'll rebase my PR and clean it up.
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.
LGTM
One comment re: usage of const.
* Add `virtual` field to TagRef * Ignore tag refs with `virtual` field set true when adding, updating, or replacing tags. * Fix bug preventing archetype tags being inherited properly * go fmt Signed-off-by: Sam Lucidi <[email protected]>
Signed-off-by: Sam Lucidi <[email protected]>
2121315
to
2ff6621
Compare
virtual
field to TagRefvirtual
field set true when adding, updating, or replacing tags.