[revert] allow someone to like their own document, as like also works as a bookmark

This commit is contained in:
Anand Doshi 2016-01-08 11:54:20 +05:30
parent 2f47f75331
commit f1dee283c6

View file

@ -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)