Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Created a locked tag which can be added to notes by mods / admin #9709
Created a locked tag which can be added to notes by mods / admin #9709
Changes from 3 commits
bdabbac
0eab1d1
52a981b
58e59b8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
From line 359 above, we have the
node_tag
variable derived from this querynode_tag = NodeTag.where(nid: params[:nid], tid: params[:tid]).first
,I am curious as to whether checking to see if
node_tag.name != "locked"
will work if the first tag derived is not"locked"
but contains a list of tags like[air-quality, locked]
....the node itself does contain a locked tag but it may not be the first to be picked hence someone else might delete a tag.Should checking if the tags returned contain
"locked"
, before picking the first one in line 359 help?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.
lol I was just reviewing this and panicked that I had merged it @jywarren 😅
Are the concerns I have above okay? Or will the tagging work as expected... @jywarren?
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.
Oh you're totally right, my bad! Yes, let's change this, we can use
@node.has_tag('locked')
instead!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.
@Manasa2850 what do you say? Thanks all!
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.
What if, in follow up, we moved this button into the advanced tagging menu? This would then appear on wikis too!