Skip to content

Commit

Permalink
[BE] fix saving default_source
Browse files Browse the repository at this point in the history
  • Loading branch information
poxip committed Jun 6, 2018
1 parent 4034445 commit f82c196
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.
## [0.6.3]
### Fixed
- saving StripeCustomer.default_source

## [0.6.2]
### Added
- missing StripeCustomer.default_source field
Expand Down
2 changes: 1 addition & 1 deletion aa_stripe/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
__title__ = "Arabella Stripe"
__version__ = "0.6.2"
__version__ = "0.6.3"
__author__ = "Jacek Ostanski"
__license__ = "MIT"
__copyright__ = "Copyright 2017 Arabella"
Expand Down
4 changes: 2 additions & 2 deletions aa_stripe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def refresh_from_stripe(self):
customer = self.retrieve_from_stripe()
if customer:
self.sources = customer.sources.data
self.default_source = customer.default_source
self.save(update_fields=["sources"])
self.default_source = customer.default_source or ""
self.save()
return customer

def get_default_source_data(self):
Expand Down

0 comments on commit f82c196

Please sign in to comment.