[DEV-14526] - Fix Agency Code in Download File Name#4612
Open
zachflanders-frb wants to merge 1 commit intoqatfrom
Open
[DEV-14526] - Fix Agency Code in Download File Name#4612zachflanders-frb wants to merge 1 commit intoqatfrom
zachflanders-frb wants to merge 1 commit intoqatfrom
Conversation
| ) | ||
|
|
||
| assert resp.status_code == status.HTTP_200_OK | ||
| assert "FY2017Q1-Q4_100_FA_AccountBalances" in resp.json()["file_name"] |
Contributor
Author
There was a problem hiding this comment.
Update to the test to ensure the name is correct and includes the agency code "100"
| def create_unique_filename(json_request: dict[str, Any], origination: str | None = None) -> str: | ||
| timestamp = datetime.strftime(datetime.now(timezone.utc), "%Y-%m-%d_H%HM%MS%S%f") | ||
| request_agency = json_request.get("agency", "all") | ||
| request_agency = json_request.get("filters", {}).get("agency", "all") |
Contributor
Author
There was a problem hiding this comment.
Just needed to update the access path to include "filters". The "agency" property is on "filters" instead of the parent level of the json_request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
The agency code was getting set to 'All' in the download name regardless of whether it was set in the request. This was due to a small bug in how the agency key was accessed on the request filters.
Explain N/A in above checklist: