Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated content-type check. This change addresses the issue where 'watchHour' is not populated. #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ReformedDoge
Copy link

Description:
"/stats?sport=lol" content-type changed to text/plain for some reason.
This caused 'watchHour' to not be populated as expected. By updating the content-type check in the condition to include both "application/json" and "text/plain" packet types, this issue is resolved.

Affected file: NetworkHandler.py

…on/json" and "text/plain" packet types.

This change addresses the issue where 'watchHour' is not populated.

"/stats?sport=lol" content-type changed to text/plain for some reason. This caused 'watchHour' to not be populated as expected. By updating the content-type check in the condition to include both "application/json" and "text/plain" packet types, this issue is resolved.

Affected file: NetworkHandler.py
@ReformedDoge
Copy link
Author

@Yudaotor,
Screenshot_1

they reverted v1/history/stats?sport=lol back to "application/json". We can keep the change as is just in case they alter it again.

Regarding the code snippet:

if packetType != "application/json" and packetType != "text/plain":
                continue

This is my third time skimming through the code, so please excuse my limited knowledge. Is the check even necessary? It seems to work fine without it, as the try block already handles the checking for the paths

@Yudaotor
Copy link
Owner

@Yudaotor, Screenshot_1

they reverted v1/history/stats?sport=lol back to "application/json". We can keep the change as is just in case they alter it again.

Regarding the code snippet:

if packetType != "application/json" and packetType != "text/plain":
                continue

This is my third time skimming through the code, so please excuse my limited knowledge. Is the check even necessary? It seems to work fine without it, as the try block already handles the checking for the paths

its unnecessary.just filter some.ok then.I will merge this when next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants