[revert] allow someone to like their own document, as like also works as a bookmark
This commit is contained in:
parent
2f47f75331
commit
f1dee283c6
1 changed files with 4 additions and 2 deletions
|
|
@ -32,8 +32,10 @@ def _toggle_like(doctype, name, add, user=None):
|
|||
|
||||
try:
|
||||
liked_by, owner = frappe.db.get_value(doctype, name, ["_liked_by", "owner"])
|
||||
if owner==frappe.session.user and add=="Yes":
|
||||
frappe.throw(_("You cannot like something that you created"))
|
||||
|
||||
# CHANGED: Allow someone to like their own documents as it also works as a bookmark
|
||||
# if owner==frappe.session.user and add=="Yes":
|
||||
# frappe.throw(_("You cannot like something that you created"))
|
||||
|
||||
if liked_by:
|
||||
liked_by = json.loads(liked_by)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue