Stripe in Blender Studio #93018

Merged
Anna Sirota merged 9 commits from studio-to-stripe into main 2024-06-17 17:39:10 +02:00
2 changed files with 9 additions and 1 deletions
Showing only changes of commit e3190f3e19 - Show all commits

View File

@ -15,6 +15,8 @@ import django.db.models
import bleach import bleach
import looper.money
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -194,6 +196,12 @@ class ExportCSVMixin:
if isinstance(value, SafeString): if isinstance(value, SafeString):
value = bleach.clean(value, tags=[], attributes={}, styles=[], strip=True) value = bleach.clean(value, tags=[], attributes={}, styles=[], strip=True)
# String representation of `Money` is prefixed with a currency code.
# We want CSVs to have amounts without currency codes, however.
if isinstance(value, looper.money.Money):
value = value.decimals_string
values.append(str(value)) values.append(str(value))
writer.writerow(values) writer.writerow(values)
return response return response

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "looper" name = "looper"
version = "3.2.9" version = "3.2.10"
description = "" description = ""
authors = [ authors = [
"Francesco Siddi <francesco@blender.org>", "Francesco Siddi <francesco@blender.org>",