Use hex property of UUID instead of undocumented get_hex method

get_hex method does not exist in Python3
This commit is contained in:
Cédric Krier committed 2017-04-29 18:43:22 +02:00
1 parent 8de07a8cb2
commit f3e59acda7
1 file changed
+2 -2
+2 -2
View File
@@ -172,7 +172,7 @@ class Payment:
@ModelView.button_action('account_payment_stripe.wizard_checkout')
def stripe_checkout(cls, payments):
for payment in payments:
payment.stripe_checkout_id = uuid.uuid4().get_hex()
payment.stripe_checkout_id = uuid.uuid4().hex
cls.save(payments)
@classmethod
@@ -320,7 +320,7 @@ class Customer(ModelSQL, ModelView):
@ModelView.button_action('account_payment_stripe.wizard_checkout')
def stripe_checkout(cls, customers):
for customer in customers:
customer.stripe_checkout_id = uuid.uuid4().get_hex()
customer.stripe_checkout_id = uuid.uuid4().hex
cls.save(customers)
@classmethod