def clean_default_account(self):
        "Check that account owner is the same as my company"
        account = self.cleaned_data['default_account']
        try:
            company = self.cleaned_data['my_company']

            if not account.owner_id == company.id:
                raise forms.ValidationError(
                    _("Default Account has to belong to your company"))

        except __HOLE__:
            pass

        return account
dataset/ETHPy150Open treeio/treeio/treeio/finance/forms.py/SettingsForm.clean_default_account