From ba6fa2a96edde375aab6cbab0fa325c0bc08cb02 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Thu, 11 Feb 2021 10:25:22 -0500 Subject: [PATCH] 17119: remove the default project_class again on the group model, it is not needed. Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- services/api/app/models/arvados_model.rb | 7 ------- services/api/app/models/group.rb | 1 - 2 files changed, 8 deletions(-) diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 2c5dee91ca..f2bae3a4b5 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -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 diff --git a/services/api/app/models/group.rb b/services/api/app/models/group.rb index 519dcd3072..870e0d0c45 100644 --- a/services/api/app/models/group.rb +++ b/services/api/app/models/group.rb @@ -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 -- 2.30.2