Skip to content

Commit

Permalink
handled edge case to prevent incorrect log when using espn public league
Browse files Browse the repository at this point in the history
  • Loading branch information
uberfastman committed Sep 29, 2024
1 parent b942bb8 commit acc9431
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ The following setup steps are ***required*** in order to allow the Slack integra
1. Sign in to your slack workspace [here](https://slack.com/signin).
2. Once logged in, you need to [create a new app](https://api.slack.com/apps?new_app=1) for your workspace.
3. After the popup appears, select `From scratch` and fill in the fields as follows:
* i. `App Name`: `ffmw-report` (this name can be anything you want)
* i. `App Name`: `ff-metrics-weekly-report` (this name can be anything you want)
* ii. `Pick a workspace to develop your app in:`: Select your chosen Slack workspace from the dropdown menu.
4. Click `Create App`. You should now be taken to the page for your new app, where you can set things like the app title card color, the icon, the description, as well as a whole host of other features (see [here](https://api.slack.com/docs/apps) for more information).
5. Select `Basic Information` from the `Settings` section in the menu on the left.
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:

app:
image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:18.1.1
image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:18.1.2
platform: linux/amd64
ports:
- "5001:5000"
Expand Down
9 changes: 5 additions & 4 deletions dao/platforms/espn.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ def _authenticate(self) -> None:

# skip credentials check for public ESPN league access when use-default is set to true
if os.environ.get("USE_DEFAULT"):
logger.info(
"Use-default is set to \"true\". Automatically running the report for the selected ESPN league without "
"credentials. This will only work for public ESPN leagues."
)
if not settings.platform_settings.espn_cookie_swid and not settings.platform_settings.espn_cookie_espn_s2:
logger.info(
"Use-default is set to \"true\". Automatically running the report for the selected ESPN league "
"without credentials. This will only work for public ESPN leagues."
)
return

if not settings.platform_settings.espn_cookie_swid or not settings.platform_settings.espn_cookie_espn_s2:
Expand Down

0 comments on commit acc9431

Please sign in to comment.