16989: setup_on_activate needs to happen after update, not before
authorPeter Amstutz <peter.amstutz@curii.com>
Mon, 12 Oct 2020 19:42:20 +0000 (15:42 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Mon, 12 Oct 2020 19:44:05 +0000 (15:44 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

services/api/app/models/user.rb

index 34a123e7247c94d3f811e9c43f3e59e266294046..6f30b27a9595e1bfd2958e6554234cc787415fc8 100644 (file)
@@ -26,7 +26,7 @@ class User < ArvadosModel
   before_update :verify_repositories_empty, :if => Proc.new {
     username.nil? and username_changed?
   }
-  before_update :setup_on_activate
+  after_update :setup_on_activate
 
   before_create :check_auto_admin
   before_create :set_initial_username, :if => Proc.new {