Skip to content

Commit

Permalink
Fix WorkPackageCustomField -> WrokPackages association
Browse files Browse the repository at this point in the history
  • Loading branch information
klaustopher committed Jun 20, 2023
1 parent 07cffd7 commit 1b4bad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/work_package_custom_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class WorkPackageCustomField < CustomField
join_table: "#{table_name_prefix}custom_fields_types#{table_name_suffix}",
foreign_key: 'custom_field_id'
has_many :work_packages,
through: :work_package_custom_values
through: :custom_values,
source: :customized,
source_type: "WorkPackage"

scope :visible_by_user, ->(user) {
if user.allowed_to_globally?(:select_custom_fields)
Expand Down

0 comments on commit 1b4bad6

Please sign in to comment.