We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf5219c commit 42c5478Copy full SHA for 42c5478
lib/pact_broker/matrix/latest_row.rb
@@ -2,11 +2,23 @@
2
3
module PactBroker
4
module Matrix
5
-
6
# Latest pact revision for each consumer version => latest verification
7
8
class LatestRow < Row
9
set_dataset(:latest_matrix)
+
+ # For some reason, with MySQL, the success column value
10
+ # comes back as an integer rather than a boolean
11
+ # for the latest_matrix view (but not the matrix view!)
12
+ # Maybe something to do with the union?
13
+ # Haven't investigated as this is an easy enough fix.
14
+ def success
15
+ value = super
16
+ value.nil? ? nil : value == true || value == 1
17
+ end
18
19
+ def values
20
+ super.merge(success: success)
21
22
end
23
24
0 commit comments