Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Fix the association between measure conditions and certificate
Browse files Browse the repository at this point in the history
It should use both the certificate type and the code as the key

Fixes: https://www.pivotaltracker.com/story/show/55703024
  • Loading branch information
matthewford committed Aug 23, 2013
1 parent 03f3130 commit 8c82d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/measure_condition.rb
Expand Up @@ -14,8 +14,8 @@ class MeasureCondition < Sequel::Model
ds.with_actual(MeasureAction)
end

one_to_one :certificate, key: :certificate_code,
primary_key: :certificate_code do |ds|
one_to_one :certificate, key: [:certificate_type_code, :certificate_code],
primary_key: [:certificate_type_code, :certificate_code] do |ds|
ds.with_actual(Certificate)
end

Expand Down

0 comments on commit 8c82d98

Please sign in to comment.