[fix] Codacy issue
This commit is contained in:
parent
722c06e819
commit
d051921ff8
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Chapter', {
|
||||
refresh: function(frm) {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -5,20 +5,11 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.website.website_generator import WebsiteGenerator
|
||||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
|
||||
class Chapter(WebsiteGenerator):
|
||||
def get_context(self, context):
|
||||
context.no_cache = True
|
||||
|
||||
def validate(self):
|
||||
chapter_head = self.chapter_head
|
||||
chapter = frappe.get_all('Chapter', filters={'published': True}, fields=['chapter_head'])
|
||||
|
||||
# if chapter_head in [d.chapter_head for d in chapter]:
|
||||
# frappe.throw(_('You are not allow to create more than one Chapter'))
|
||||
|
||||
def enable(self):
|
||||
chapter = frappe.get_doc('Chapter', frappe.form_dict.name)
|
||||
chapter.append('members', dict(enable=self.value))
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestChapter(unittest.TestCase):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class ChapterMember(Document):
|
||||
|
@ -3,10 +3,8 @@
|
||||
|
||||
frappe.ui.form.on('Chapter Message', {
|
||||
onload: function(frm){
|
||||
console.log("here" + frappe.session.user)
|
||||
chapter_head = frappe.session.user
|
||||
frappe.db.get_value('Chapter', {chapter_head: chapter_head}, 'name', function(data) {
|
||||
frm.set_value('chapter', data.name);
|
||||
})
|
||||
frappe.db.get_value('Chapter', {chapter_head: frappe.session.user}, 'name', function(data) {
|
||||
frm.set_value('chapter', data.name);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe import _
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
frappe.ui.form.on('Donor', {
|
||||
refresh: function(frm) {
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Donor'}
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Donor'};
|
||||
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
|
||||
class Donor(Document):
|
||||
def onload(self):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestDonor(unittest.TestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Donor Type', {
|
||||
refresh: function(frm) {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class DonorType(Document):
|
||||
|
@ -3,7 +3,7 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
|
||||
import unittest
|
||||
|
||||
class TestDonorType(unittest.TestCase):
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
frappe.ui.form.on('Grant Application', {
|
||||
refresh: function(frm) {
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Grant Application'}
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Grant Application'};
|
||||
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
|
||||
class GrantApplication(Document):
|
||||
def onload(self):
|
||||
|
@ -1,3 +1,3 @@
|
||||
frappe.listview_settings['Grant Application'] = {
|
||||
add_fields: ["grant_application_name", "image"],
|
||||
add_fields: ["grant_application_name", "image"],
|
||||
};
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestGrantApplication(unittest.TestCase):
|
||||
|
@ -4,7 +4,7 @@
|
||||
frappe.ui.form.on('Member', {
|
||||
refresh: function(frm) {
|
||||
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Member'}
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Member'};
|
||||
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
|
||||
class Member(Document):
|
||||
def onload(self):
|
||||
|
@ -1,3 +1,3 @@
|
||||
frappe.listview_settings['Member'] = {
|
||||
add_fields: ["member_name", "member_type", "image"],
|
||||
add_fields: ["member_name", "member_type", "image"],
|
||||
};
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestMember(unittest.TestCase):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestMembership(unittest.TestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Membership Type', {
|
||||
refresh: function(frm) {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestMembershipType(unittest.TestCase):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestVolunteer(unittest.TestCase):
|
||||
|
@ -4,7 +4,7 @@
|
||||
frappe.ui.form.on('Volunteer', {
|
||||
refresh: function(frm) {
|
||||
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Volunteer'}
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Volunteer'};
|
||||
|
||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||
|
||||
|
@ -3,9 +3,8 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||
|
||||
class Volunteer(Document):
|
||||
def onload(self):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestVolunteerAvailability(unittest.TestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Volunteer Availability', {
|
||||
refresh: function(frm) {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class VolunteerAvailability(Document):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class VolunteerSkills(Document):
|
||||
|
@ -3,7 +3,6 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestVolunteerType(unittest.TestCase):
|
||||
|
@ -2,7 +2,7 @@
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('Volunteer Type', {
|
||||
refresh: function(frm) {
|
||||
refresh: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -3,7 +3,6 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class VolunteerType(Document):
|
||||
|
Loading…
x
Reference in New Issue
Block a user