infopark / webcrm_sdk

SDK for Infopark WebCRM
MIT License
2 stars 2 forks source link

Type definition does not contain valid languages for a contact #8

Closed Skudo closed 8 years ago

Skudo commented 8 years ago

Using infopark_webcrm_sdk version 1.0.3, the type definition you get from Crm::Type#standard_attribute_definitions does not contain valid values for a contact's language attribute:

type = Crm::Type.find(:contact)
type.standard_attribute_definitions[:language]
=> {"attribute_type"=>"enum", "create"=>true, "mandatory"=>true, "read"=>true, "title"=>"Language", "update"=>true, "valid_values"=>[]}

The type definition in general knows about valid languages though:

type.languages
=> ["de", "en"]

The lack of valid_values eventually leads to wrong validation results, when you're trying to validate an object with Crm::Type#standard_attribute_definitions and Crm::Type#attribute_definitions.

apepper commented 8 years ago

This is not an SDK, but an API issue, since the API does not report valid_values for languages.

@Skudo: can you reopen an issue at https://github.com/infopark/omc/issues ?

Skudo commented 8 years ago

kk, done.