Skip to content

Commit d745c7b

Browse files
committed
Upgrade gspread to latest
This newer version of the library requires a `Path` object, not just a `str`, so update accordingly.
1 parent 1ac1b12 commit d745c7b

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

poetry.lock

+21-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ws/utils/member_sheets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def update_participant(
219219
220220
Much more efficient than updating the entire sheet.
221221
"""
222-
client = gspread.service_account(settings.OAUTH_JSON_CREDENTIALS)
222+
client = gspread.service_account(Path(settings.OAUTH_JSON_CREDENTIALS))
223223
wks = client.open_by_key(discount.ga_key).sheet1
224224
writer = SheetWriter(discount, trust_cache=False)
225225

@@ -250,7 +250,7 @@ def update_discount_sheet(discount: models.Discount, trust_cache: bool) -> None:
250250
For individual updates, this approach should be avoided (instead, opting to
251251
update individual cells in the spreadsheet).
252252
"""
253-
client = gspread.service_account(settings.OAUTH_JSON_CREDENTIALS)
253+
client = gspread.service_account(Path(settings.OAUTH_JSON_CREDENTIALS))
254254
wks: gspread.worksheet.Worksheet = client.open_by_key(discount.ga_key).sheet1
255255
participants = list(
256256
discount.participant_set.select_related("membership", "user").order_by("name")

0 commit comments

Comments
 (0)