fix(hub): Prevent registered actions

This commit is contained in:
Faris Ansari
2018-11-05 19:18:48 +05:30
parent 0d08da50c6
commit d6b664f7ee
3 changed files with 7 additions and 1 deletions

View File

@@ -113,6 +113,10 @@ export default {
content: this.review_content.get_value()
});
if (!hub.is_seller_registered()) {
frappe.throw(__('You need to login as a Marketplace User before you can add any reviews.'));
}
hub.call('add_item_review', {
hub_item_name: this.hub_item_name,
review: JSON.stringify(review)