-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
fix: TypeError while saving Job card #35380
Merged
Merged
Conversation
This file contains 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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #35380 +/- ##
========================================
Coverage 63.82% 63.82%
========================================
Files 813 813
Lines 60209 60260 +51
========================================
+ Hits 38428 38462 +34
- Misses 21781 21798 +17
|
@Vishnu7025 instead of making the field for_quantity mandatory, can you change the below code in the job_card.py Old Code
New Code
|
s-aga-r
approved these changes
May 23, 2023
s-aga-r
added
backport version-14-hotfix
backport to version 14
backport version-13-hotfix
labels
May 23, 2023
This was referenced May 23, 2023
s-aga-r
added a commit
that referenced
this pull request
May 23, 2023
…-35380 fix: TypeError while saving Job card (backport #35380)
s-aga-r
added a commit
that referenced
this pull request
May 23, 2023
…-35380 fix: TypeError while saving Job card (backport #35380)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
request.js:457 Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/init.py", line 1607, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 26, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 305, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 327, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 259, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1045, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 914, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1264, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1246, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 911, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/manufacturing/doctype/job_card/job_card.py", line 70, in validate
self.set_status()
File "apps/erpnext/erpnext/manufacturing/doctype/job_card/job_card.py", line 733, in set_status
if self.for_quantity <= self.transferred_qty:
TypeError: '<=' not supported between instances of 'NoneType' and 'int'