Prevent Duplicate Options in 'Select Guidance'#3365
Merged
benjaminfaure merged 3 commits intodevelopmentfrom Apr 9, 2024
Merged
Prevent Duplicate Options in 'Select Guidance'#3365benjaminfaure merged 3 commits intodevelopmentfrom
benjaminfaure merged 3 commits intodevelopmentfrom
Conversation
c6f73c9 to
44792a5
Compare
johnpinto1
approved these changes
Mar 4, 2024
Contributor
johnpinto1
left a comment
There was a problem hiding this comment.
I have tested code by setting our Digital Curation Centre as default org in config/initializers/_dmproadmap.rb.
# Your organisation name, used in various places throught the application
config.x.organisation.name = 'Digital Curation Center'
# Your organisation's abbreviation
config.x.organisation.abbreviation = 'DCC'
Current development branch duplicates guidance for Digital Curation Centre:

44792a5 to
f17ea1a
Compare
aaronskiba
added a commit
that referenced
this pull request
Mar 26, 2024
aaronskiba
added a commit
that referenced
this pull request
Mar 26, 2024
58fecd0 to
884c508
Compare
- Prior to this commit, if current_user.org was also a @default_org, then @important_ggs would contain duplicate [org, ggs].
884c508 to
a3676ab
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Fixes #3343
Changes proposed in this PR:
Reasoning Behind Changes
current_user.orgwas also a@default_org, then@important_ggswould contain duplicate[org, ggs].!(ggs & @selected_guidance_groups).empty?is changed to(ggs & @selected_guidance_groups).any?(the two statements should evaluate identically in this context).