You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create a user model that will fail when put() is called on it. E.g.:
class CustomUser(webapp2_extras.appengine.auth.models.User):
has_error = ndb.StringProperty(default=False)
2. call
ok, user = CustomUser.create_user('some_fake_auth_id')
3. the line "user.put()" in create_user
http://webapp-improved.appspot.com/_modules/webapp2_extras/appengine/auth/models
.html#User.create_user
will fail.
4. The Unique datastore will hold an entry for CustomUser with
'some_fake_auth_id', but CustomUser will be empty, because user creation failed.
What version of the product are you using? On what operating system?
App Engine / Python
- name: webapp2
version: "2.5.1"
Please provide any additional information below.
Though this example the error is clearly on the programmer's side in providing
a model that won't allow for it to be saved, there are other sources of errors
(DeadLineExceededError e.g.) that will cause user.put() to fail. I think in
that case, webapp2 should handle this scenario gracefully and rollback the
changes it made to the Unique datastore.
Original issue reported on code.google.com by [email protected] on 18 Jul 2013 at 6:28
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 18 Jul 2013 at 6:28The text was updated successfully, but these errors were encountered: