azahara_schema 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4dcd16a3585d58ce16ae1024bbed3cc99e9a104482c4a7cfb2036c1859a5680a
4
- data.tar.gz: 28df4064eff0dc71aebeb6ed4f9ceab7cbd0fd7effb3163d2204812a1e5c7de1
3
+ metadata.gz: 9abad55e1cb8f8e4c6fe632e5bfa1c9fdf7d394af60e7623ba9ee961d9e94c49
4
+ data.tar.gz: 2879cbe15b1426c44e4c6b07896432db3ae7b3c8b8fa91b234d76085a16df36c
5
5
  SHA512:
6
- metadata.gz: 7e7cebd086415934ba36e065f9cea3e0e6ad336467b31f2254e502c08ce552c6476a052e7d24cb3452e00e4004d4760a420dc270740a06f0104134a97b7584f6
7
- data.tar.gz: f9b6a738aed67077dc2929a4c0ab590318048559f02e6397943e94b58ffaa6a3e5c9ef4ff4b9ebcda0c84dfdeac16ba57ea59abcc5fc0209a74e7bf136357c95
6
+ metadata.gz: 3c6b320eaa6e40c343da6ff038ee385f960ccb75a8ffecea122f29c994573ddc8740f11c21703acc21f093f3516f78f207ecf501135d5984d9c390401039e5fe
7
+ data.tar.gz: e29e129457bf1cdcb4aa4e5889b70592321a88153b0a971ce5aa682b42294bea52d6f5bd4784933c06924a7e080f895ff4bd8bb46e946a756763149c26217275
@@ -22,7 +22,7 @@ module AzaharaSchema
22
22
 
23
23
  def value(parent)
24
24
  val = attribute.attribute.add_join( parent.send(attribute.association.name) ).sum(attribute.arel_field)
25
- val = BigDecimal.new(val.to_s) unless val.is_a?(BigDecimal)
25
+ val = BigDecimal(val.to_s.presence || 0) unless val.is_a?(BigDecimal)
26
26
  val
27
27
  end
28
28
 
@@ -1,3 +1,3 @@
1
1
  module AzaharaSchema
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azahara_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2021-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails