this variable is named `cls`, not `cls_`
Merge pull request #177 from goodscloud/fix_assign_attributes

this variable is named `cls`, not `cls_`
fix _get_or_create

This code queried for the instance using the key returned by `_primary_key_name`. That function however only returns the *first* primary key. And it may be that several primary keys are needed to uniquely identify a row, so it wasn't guaranteed to always get the correct row.

It also did not check whether the result of `_get_by` returned `None`, in which case it would go on to assign attributes to `None` rather than a model object.
Merge pull request #178 from goodscloud/fix_get_or_create

fix _get_or_create
Code style fixes.
Fixes duplicate test function name.
Merge branch 'master' of ssh://github.com/jfinkels/flask-restless
Style fixes.
Uses ternary conditional operator now in session_query().
Fix issues with proxies directly to column attributes

- Handle setting an association proxy value when the value is a single
  column (not a model)
- Handle situation where Association proxy doesn't have a mapper
  attribute when used for a single column