summaryrefslogtreecommitdiff
path: root/app/models/members/project_member.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/members/project_member.rb')
-rw-r--r--app/models/members/project_member.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb
index 8fd82fcb34a..1099e0f48c0 100644
--- a/app/models/members/project_member.rb
+++ b/app/models/members/project_member.rb
@@ -10,7 +10,7 @@ class ProjectMember < Member
delegate :namespace_id, to: :project
# Make sure project member points only to project as it source
- default_value_for :source_type, SOURCE_TYPE
+ attribute :source_type, default: SOURCE_TYPE
validates :source_type, format: { with: SOURCE_TYPE_FORMAT }
default_scope { where(source_type: SOURCE_TYPE) } # rubocop:disable Cop/DefaultScope