Here's the actual code block.

   def save(self, request):
        from django.contrib import auth
        userKey = request.session["_auth_user_id"]
        new_user = db.get(request.session["_auth_user_id"])
        new_user.username = self.cleaned_data['username']
        new_user.is_active = True
        new_user.put()

        self.teams = []
        for field in self.cleaned_data:
            if field is not 'username':
                if self.cleaned_data[field]:
                    myteam = FavoriteTeams(user = new_user, team =
field)
                    myteam.put()
                    self.teams.append(field)
        result = FavoriteTeamsRanking.get_or_insert("teams",
json=simplejson.dumps({'teams': {}}))

-----------------------------
the new_user.put()
-----------------------------

is going through

-----------------------------
result = FavoriteTeamsRanking.get_or_insert("teams",
json=simplejson.dumps({'teams': {}}))
-----------------------------

result is coming back as a None value

In the 1.1.7 SDK it is working correctly.  The FavoriteTeamsRanking is
not getting populated at all on the live site, and the only thing I
can think of at first is that it's the second instance of a put in the
request. However, I suppose get_or_insert can be broken? I've just run
into this within the past 10 minutes and was hitting the groups for
ideas of things to look at and saw this new post which seemed like it
could be similar.

I'm going to try and set up a test to see if I can track down what's
going on a bit better and will post the test and results in a few
minutes.

On Dec 17, 8:33 pm, Marzia Niccolai <[email protected]> wrote:
> Hi,
>
> Today we made some changes to the production system, but did not anticipate
> this having any effect on application's running with App Engine.  The
> solution for Gary's issue is the one he suggested, but Joseph, I was
> wondering if you could elaborate more on the scenario you are experiencing?
>
> Also, please know that we are working to reduce the impact that such changes
> will have on applications, and thanks for all your patience while we look in
> to the issues here.
>
> -Marzia
>
> On Wed, Dec 17, 2008 at 5:28 PM, [email protected] <
>
> [email protected]> wrote:
>
> > I'm noticing on my app, requests where I have multiple puts only
> > appear to be doing the initial put, and not the following ones. Not
> > sure if this is the same issue you are running into, but this is new
> > as the functionality did exist before. Though, it does seem to
> > possibly be working for other apps, so I'm not sure what's going on. I
> > verified this by checking a get_or_insert after another put had been
> > done, and it's not creating the data and also returning as a None
> > value.
>
> > On Dec 17, 7:27 pm, Garrett Davis <[email protected]> wrote:
> > > Say, did someone make a change to the 'cloud' version of the
> > > ModelForms module?
>
> > > Several of my applications, which had been running on the 'cloud' for
> > > months, had a reference to a UserProperty class defined in
> > >    google.appengine.ext.db.djangoforms
> > > and they started crashing today, with an error message that said,
> > > <type 'exceptions.AttributeError'>: 'module' object has no attribute
> > > 'UserProperty'
>
> > > I changed the references in my applications,
> > > from the 'modelforms' module to another UserProperty class defined in
> > >    google.appengine.ext.db
> > > and my applications are working again.
>
> > > But I worry about the concept that the GAE infrastructure is subject
> > > to un-announced changes that might again crash my applications.
>
> > > Or did I miss an announcement or something?
> > > Garrett Davis
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to