17119: remove the default project_class again on the group model, it is
authorWard Vandewege <ward@curii.com>
Thu, 11 Feb 2021 15:25:22 +0000 (10:25 -0500)
committerWard Vandewege <ward@curii.com>
Thu, 11 Feb 2021 20:47:39 +0000 (15:47 -0500)
       not needed.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

services/api/app/models/arvados_model.rb
services/api/app/models/group.rb

index 2c5dee91ca3aeb44ef5f27b37619abdb560bc7c6..f2bae3a4b5b2c79a9a3aacc882b7e570d713bc92 100644 (file)
@@ -889,13 +889,6 @@ class ArvadosModel < ApplicationRecord
     }.merge(attributes['scheduling_parameters'] || {})
   end
 
-  # The 'group_class' for a group should default to 'project'
-  def fill_group_defaults
-    if !attributes.key?("group_class") || attributes['group_class'].nil? || attributes['group_class'].empty?
-      self.group_class = 'project'
-    end
-  end
-
   # ArvadosModel.find_by_uuid needs extra magic to allow it to return
   # an object in any class.
   def self.find_by_uuid uuid
index 519dcd3072013c5c2280d2eab90f4a33beee6a10..870e0d0c456ddd21e777351afea6106cdd6b7325 100644 (file)
@@ -16,7 +16,6 @@ class Group < ArvadosModel
   # already know how to properly treat them.
   attribute :properties, :jsonbHash, default: {}
 
-  before_validation :fill_group_defaults
   validate :ensure_filesystem_compatible_name
   validate :check_group_class
   before_create :assign_name