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: event permission issue #371

Closed
wants to merge 1 commit into from
Closed

Conversation

fkalpana
Copy link

If a user tries to change the patient appointment schedule that is done by another user, it throws a permission error. This error happens because or event doctype has different permission structure.

I have added event_doc.save(ignore_permissions=True) to fix this.

Error details

"apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py", line 46, in validate
self.update_event()
File "apps/healthcare/healthcare/healthcare/doctype/patient_appointment/patient_appointment.py", line 350, in update_event
event_doc.save()
File "apps/frappe/frappe/model/document.py", line 309, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 333, in _save
self.check_permission("write", "save")
File "apps/frappe/frappe/model/document.py", line 196, in check_permission
self.raise_no_permission_to(permtype)
File "apps/frappe/frappe/model/document.py", line 218, in raise_no_permission_to
raise frappe.PermissionError
frappe.exceptions.PermissionError

@akashkrishna619
Copy link
Collaborator

@fkalpana please follow what-is-commitlint and please update your commit message

@akashkrishna619 akashkrishna619 changed the title fixing event permission issue fix: event permission issue Feb 8, 2024
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