def create(self, values): data = values.copy() CredentialsAPI.transpose(data) if 'tenant_id' in values: if data['tenant_id'] is None and values['tenant_id'] is not None: raise fault.ItemNotFoundFault('Invalid tenant id: %s' % \ values['tenant_id']) credentials_ref = models.Credentials() credentials_ref.update(data) credentials_ref.save() return CredentialsAPI.to_model(credentials_ref)
def create(self, values): credentials_ref = models.Credentials() credentials_ref.update(values) credentials_ref.save() return credentials_ref