def __setattr__(self, name, value): if name == 'account_id': if value and not utils.is_valid_google_account(value): raise ValueError('Given Google Analytics account ID is not valid') elif name == 'campaign': if isinstance(value, Campaign): value.validate() else: value = None object.__setattr__(self, name, value)
def __setattr__(self, name, value): if name == 'account_id': if value and not utils.is_valid_google_account(value): raise ValueError( 'Given Google Analytics account ID is not valid') elif name == 'campaign': if isinstance(value, Campaign): value.validate() else: value = None object.__setattr__(self, name, value)