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

fix(core): Fix base document #6855

Merged
merged 2 commits into from Jan 30, 2019

Conversation

surajshetty3416
Copy link
Member

Fixes "object has no attribute 'parent_doc'" error while saving a doc.

Example

Traceback (most recent call last):
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/app.py", line 61, in application
    response = frappe.handler.handle()
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/handler.py", line 56, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/__init__.py", line 1013, in call
    return fn(*args, **newargs)
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/model/document.py", line 260, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/model/document.py", line 294, in _save
    self.validate_higher_perm_levels()
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/model/document.py", line 554, in validate_higher_perm_levels
    self.reset_values_if_no_permlevel_access(has_access_to, high_permlevel_fields)
  File "/home/frappe/benches/bench-2019-01-23/apps/frappe/frappe/model/base_document.py", line 758, in reset_values_if_no_permlevel_access
    self.parent_doc.get_latest()
AttributeError: 'Task' object has no attribute 'parent_doc'

@nabinhait nabinhait merged commit f5ded9f into frappe:hotfix Jan 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants