def getMoneyIOUserType(self, id, user): moneyiousertype = None try: moneyiousertype = MoneyIOUserType.get_by_id(int(id)) if moneyiousertype.user.id <> user.id: moneyiousertype = None except: moneyiousertype = None return moneyiousertype