OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Never return Concurrent::ThreadLocalVar instances directly
Christophe Bliarda4364380ddd9
diff --git a/app/models/journal/notification_configuration.rb b/app/models/journal/notification_configuration.rbindex 48488591f6e..26473af5fe6 100644--- a/app/models/journal/notification_configuration.rb+++ b/app/models/journal/notification_configuration.rb@@ -47,7 +47,8 @@ class Journal::NotificationConfigurationenddef active?- active.value+ @active ||= Concurrent::ThreadLocalVar.new(DEFAULT)+ @active.valueendprotected@@ -73,20 +74,13 @@ class Journal::NotificationConfigurationRails.logger.debug message.stripend- def active- @active ||= Concurrent::ThreadLocalVar.new(DEFAULT)- end-- def already_set- @already_set ||= Concurrent::ThreadLocalVar.new(false)+ def active=(value)+ @active.value = valueenddef already_set?- already_set.value- end-- def active=(value)- @active.value = value+ @already_set ||= Concurrent::ThreadLocalVar.new(false)+ @already_set.valueenddef already_set=(value)