[fix] Codacy Issue
This commit is contained in:
parent
f86984c785
commit
86140c8659
@ -7,9 +7,6 @@ import frappe
|
|||||||
from frappe.website.website_generator import WebsiteGenerator
|
from frappe.website.website_generator import WebsiteGenerator
|
||||||
|
|
||||||
class Chapter(WebsiteGenerator):
|
class Chapter(WebsiteGenerator):
|
||||||
def get_context(self, context):
|
|
||||||
context.no_cache = True
|
|
||||||
|
|
||||||
def enable(self):
|
def enable(self):
|
||||||
chapter = frappe.get_doc('Chapter', frappe.form_dict.name)
|
chapter = frappe.get_doc('Chapter', frappe.form_dict.name)
|
||||||
chapter.append('members', dict(enable=self.value))
|
chapter.append('members', dict(enable=self.value))
|
||||||
|
|||||||
@ -6,7 +6,6 @@ from __future__ import unicode_literals
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class ChapterMember(Document):
|
class ChapterMember(Document):
|
||||||
def get_context(self, context):
|
pass
|
||||||
context.no_cache = True
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,9 +8,6 @@ from frappe.model.document import Document
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
class ChapterMessage(Document):
|
class ChapterMessage(Document):
|
||||||
def get_context(self, context):
|
|
||||||
context.no_cache = True
|
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
chapter = frappe.get_doc('Chapter', self.chapter)
|
chapter = frappe.get_doc('Chapter', self.chapter)
|
||||||
if frappe.session.user != chapter.chapter_head:
|
if frappe.session.user != chapter.chapter_head:
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestChapterMessage(unittest.TestCase):
|
class TestChapterMessage(unittest.TestCase):
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class MembershipType(Document):
|
class MembershipType(Document):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user