Skip to content

Commit 9255091

Browse files
author
Erwin Fedasz
authored
Merge pull request #53 from basecrm/v1.3.1
v1.3.1
2 parents d582c93 + 2a3b09d commit 9255091

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## CHANGELOG
22

3+
v1.3.1 (2017-12-08)
4+
**Features and Improvements**
5+
6+
* Fixed issue where could not update deal without passing value
7+
38
v1.3.0 (2017-10-19)
49
**Features and Improvements**
510

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1

lib/basecrm/services/deals_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def extract_params!(deal, *args)
133133

134134
def sanitize(deal)
135135
deal_hash = deal.to_h.select { |k, _| OPTS_KEYS_TO_PERSIST.include?(k) }
136-
deal_hash[:value] = Coercion.to_string(deal_hash[:value])
136+
deal_hash[:value] = Coercion.to_string(deal_hash[:value]) if deal_hash[:value]
137137
deal_hash
138138
end
139139
end

lib/basecrm/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module BaseCRM
2-
VERSION = "1.3.0"
2+
VERSION = "1.3.1"
33
end

spec/services/deals_service_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
@deal = create(:deal)
5353
expect(client.deals.update(@deal)).to be_instance_of BaseCRM::Deal
5454
end
55+
56+
it "allows to skip deal value in payload" do
57+
@deal = create(:deal, value: nil)
58+
expect(client.deals.update(@deal)).to be_instance_of BaseCRM::Deal
59+
end
5560
end
5661

5762
describe :destroy do

0 commit comments

Comments
 (0)