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

Project API fix - Added None check on content length when size exceeds limit. #828

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

kbecker42
Copy link

@kbecker42 kbecker42 commented Mar 16, 2023

  • Added fix for None content length: '>' not supported between instances of 'NoneType' and 'int'

The missing request.content_length appears to occur when issuing a PUT request to http:// instead of https://.

Fix for the following

PUT http://qa.gigwork.net/api/project/1887

Request

{
	"info": {
		"task_presenter": "acb123...",
		"task_guidelines": "",
		"data_classification": {
			"input_data": "abc",
			"output_data": "xyz"
		}
        }
}

Response

{
	"action": "PUT",
	"status": "failed",
	"status_code": 415,
	"target": "project",
	"exception_cls": "TypeError",
	"exception_msg": "'>' not supported between instances of 'NoneType' and 'int'"
}

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4438579308

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.07%

Totals Coverage Status
Change from base Build 4438003522: 0.0%
Covered Lines: 16736
Relevant Lines: 17791

💛 - Coveralls

Copy link

@n00rsy n00rsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks

@kbecker42 kbecker42 merged commit 9ebb7b6 into main Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants