'check for does customer belong to same project as entered..'

def validate_proj_cust(self):

    if (self.project and self.customer):
        res = frappe.db.sql(u"select    name    from    `tabProject`\n DCTB  DCTB  DCTB  DCTB where    name    =    %s    and    (customer    =    %s    or    customer    is    null    or    customer    =    '')", (self.project, self.customer))
        if (not res):
            throw(_(u'Customer    {0}    does    not    belong    to    project    {1}').format(self.customer, self.project))
