chore: remove unused get_limits method (#8347)

* chore: remove unused get_limits method

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: remove misleading docstring from email_queue

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay Pai 2019-09-05 16:11:52 +05:30 committed by GitHub
parent 5243c6fb01
commit 4aedbb58a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,8 +20,7 @@ class EmailQueue(Document):
self.prevent_email_queue_delete()
def prevent_email_queue_delete(self):
'''If email limit is set, don't allow users to delete Email Queue record'''
if get_limits().emails and frappe.session.user != 'Administrator':
if frappe.session.user != 'Administrator':
frappe.throw(_('Only Administrator can delete Email Queue'))
def get_duplicate(self, recipients):