Skip to content

Commit

Permalink
Merge pull request #88 from tarunbhardwaj/develop
Browse files Browse the repository at this point in the history
Handle case when telephone is not in magento data
  • Loading branch information
tarunbhardwaj committed Apr 7, 2015
2 parents 0a0f6f3 + 290d289 commit aadaad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion party.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def create_for_party_using_magento_data(cls, party, address_data):
}])

# Create phone as contact mechanism
if not ContactMechanism.search([
if address_data.get('telephone') and not ContactMechanism.search([
('party', '=', party.id),
('type', 'in', ['phone', 'mobile']),
('value', '=', address_data['telephone']),
Expand Down

0 comments on commit aadaad4

Please sign in to comment.