mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 23:54:43 +08:00
Merge pull request #491 from biosistemika/ml_sci_1028_v2
Fix repeat tutorial is always created on the same team [SCI-1028]
This commit is contained in:
commit
b65c716b79
1 changed files with 4 additions and 4 deletions
|
@ -5,12 +5,12 @@ module FirstTimeDataGenerator
|
|||
|
||||
# First team that this user created
|
||||
# should contain the "intro" project
|
||||
if cookies[:repeat_tutorial_org_id] && cookies[:repeat_tutorial_team_id]
|
||||
if cookies[:repeat_tutorial_org_id] || cookies[:repeat_tutorial_team_id]
|
||||
team = Team.find_by_id(cookies[:repeat_tutorial_org_id])
|
||||
team ||= Team.find_by_id(cookies[:repeat_tutorial_team_id])
|
||||
cookies.delete :repeat_tutorial_org_id if cookies[:repeat_tutorial_org_id]
|
||||
if cookies[:repeat_tutorial_team_id]
|
||||
cookies.delete :repeat_tutorial_team_id
|
||||
%w(repeat_tutorial_team_id repeat_tutorial_org_id)
|
||||
.each do |repeat_tutorial|
|
||||
cookies.delete repeat_tutorial.to_sym if cookies[repeat_tutorial.to_sym]
|
||||
end
|
||||
else
|
||||
team = user
|
||||
|
|
Loading…
Add table
Reference in a new issue