Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1efbb24

Browse files
authored
send sponsor_id when calling pycon create voucher api (#2722)
1 parenteaeb157 commit1efbb24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎sponsors/management/commands/create_pycon_vouchers_for_sponsors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ def api_call(uri, query):
6666
scheme="http"ifsettings.DEBUGelse"https"
6767
url=f"{scheme}://{settings.PYCON_API_HOST}{uri}"
6868
try:
69-
returnrequests.get(url,headers=headers,params=query).json()
69+
r=requests.get(url,headers=headers,params=query)
70+
returnr.json()
7071
exceptRequestException:
72+
print(r,r.content)
7173
raise
7274

7375

@@ -103,6 +105,7 @@ def generate_voucher_codes(year):
103105
"voucher_type":code["voucher_type"],
104106
"quantity":quantity.quantity,
105107
"sponsor_name":sponsorbenefit.sponsorship.sponsor.name,
108+
"sponsor_id":sponsorbenefit.sponsorship.sponsor.id,
106109
},
107110
)
108111
ifresult["code"]==200:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp