Skip to content

Use lookup_spreadsheet_name() in status_check() to ensure spreadsheet still exists #14

@e13h

Description

@e13h

If a user deletes the spreadsheet, the main checklist will still show a green checkmark until the user clicks on "Manage". Then, a call to the Google Sheets API is finally made and will remove the spreadsheet from the database when the call returns an error.

https://github.com/evanphilipsmith/gsheets-plaid/blob/fba22d39d019183bdd4cb72895646be22bffff8f/gsheets_plaid/web_server/main.py#L299

We could add a call to lookup_spreadsheet_name() in the status_check() function here. But since spinning up a gsheets_service object is 5 lines of code, and we are already doing it twice, I'd rather not just copy/paste that again. So, we need to first figure out how to either pass in an existing gsheets_service object or encapsulate the logic for creating it into a single function call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions