Commit bba5f921 authored by mo khan's avatar mo khan Committed by Ash McKenzie

Sometimes policy is an AR, sometimes it is a Hash

parent 3d317f30
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
class ManagedLicenseEntity < Grape::Entity class ManagedLicenseEntity < Grape::Entity
expose :id expose :id
expose :classification, as: :approval_status do |policy| expose :classification, as: :approval_status do |policy|
SoftwareLicensePolicy::APPROVAL_STATUS.key(policy.classification) || classification = policy[:classification]
policy.classification SoftwareLicensePolicy::APPROVAL_STATUS.key(classification) || classification
end end
expose :software_license, merge: true do expose :software_license, merge: true do
expose :name expose :name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment