The line 55 `user = CommCareUser.get_by_user_id(self.editable_user_id, self.domain)`, when the `id` is of a doc of different type. Following is an example.
```
>>> CommCareUser.get_by_user_id("cbf1f0d06b361dafbfaf02e3679b9037", "hqtest")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/sravfeyn/src/commcare-hq/corehq/apps/users/models.py", line 1045, in get_by_user_id
    couch_user = cls.wrap_correctly(cls.get_db().get(userID))
  File "/home/sravfeyn/src/commcare-hq/corehq/apps/users/models.py", line 1003, in wrap_correctly
    }[source['doc_type']].wrap(source)
KeyError: 'Application'
```