We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0f72b7 commit 3cf59caCopy full SHA for 3cf59ca
grails-app/services/au/org/ala/biocollect/merit/SettingService.groovy
@@ -44,17 +44,11 @@ class SettingService {
44
def loadHubConfig(hub) {
45
46
if (!hub) {
47
- // assign hub using the logic
48
- // 1. Use previous hub from cookie.
49
- // 2. Otherwise, use default hub setting.
+ hub = grailsApplication.config.app.default.hub?:'default'
50
String previousHub = cookieService.getCookie(LAST_ACCESSED_HUB)
51
if (!previousHub) {
52
- hub = grailsApplication.config.app.default.hub?:'default'
53
cookieService.setCookie(LAST_ACCESSED_HUB, hub, -1 /* -1 means the cookie expires when the browser is closed */)
54
}
55
- else {
56
- hub = previousHub
57
- }
58
59
else {
60
// Hub value in multiple places like url path and in parameter causes Array to be passed instead of String.
0 commit comments