zendesk / sunshine-conversations-python

Smooch API Library for Python
Apache License 2.0
23 stars 8 forks source link

ValueError: Invalid value for `platform` (twilio), must be one of ['ios', 'android', 'web', 'other'] #2

Closed kolanos closed 7 years ago

kolanos commented 7 years ago

This error occurs when platform is twilio:

  File /"/smooch/models/client.py", line 176, in platform
    .format(platform, allowed_values)
ValueError: Invalid value for `platform` (twilio), must be one of ['ios', 'android', 'web', 'other']
kolanos commented 7 years ago

For clarification this is a result of a smooch.AppUserApi().get_app_user(user_id).

kolanos commented 7 years ago

Current monkey patching workaround:

from smooch.models.client import Client

@Client.platform.setter
def platform(self, platform):
    self._platform = platform

Client.platform = platform
alavers commented 7 years ago

Thanks for filing, I've fixed this in https://github.com/smooch/smooch-python/releases/tag/1.5.0