It seems that I need to put a index for this to work! I have beefed up
my exception handling to help me track this issue.

David

On Mar 12, 5:58 pm, Marzia Niccolai <[email protected]> wrote:
> Hi,
>
> What is the error that it throws?
>
> -Marzia
>
> On Thu, Mar 12, 2009 at 3:47 AM, David Burns <[email protected]> wrote:
>
> > I am having a small issue with my app when its running up on the live
> > environment. When I try store an object into the datastore it throws
> > an error.
>
> > Model
>
> > class Story(db.Model):
> > ''' This model will hold all the information for that the items that
> > need to be worked on'''
> > StoryName = db.StringProperty(required=True)
> > StoryID = db.IntegerProperty()
> > IWant = db.StringProperty()
> > SoThat = db.StringProperty()
> > WithScenario = db.TextProperty() # Scenarios will hold major test
> > cases that need to be passed
> > Status = db.StringProperty(required=True, choices=set
> > (["New","InDev","InTest","Complete","Rejected"])) # This will hold
> > what state the item is in.
> > created = db.DateTimeProperty()
> > Owner = db.UserProperty(required=True)
> > Priority = db.IntegerProperty()
> > OrgRef = db.ReferenceProperty(Organisation)
> > ProjectID = db.ReferenceProperty(Project)
>
> > Code throwing the error
> >  def _getNextStoryID(self,orgKey):
> > '''
> > This method collects the next available StoryID and returns it to its
> > caller
> > @Returns the next available number for the organisation
> > '''
> > logging.debug('storystore._getNextStoryID: has been called')
> > try:
> > story_query = Story.all()
> > story_query.filter('OrgRef = ', orgKey)
> > story_query.order('-StoryID')
> > story = story_query.get()
> > if story is None:
> > storyID = 1
> > else:
> > storyID = story.StoryID + 1
> > return storyID
> > except:
> > raise "Story ID could not be collected"
>
> > The line that is throwing the error seems to be story_query = Story.all
> > ()
>
> > This all seems to be fine on my dev environment but when I deploy it I
> > get errors thrown.
>
> > I appreciate any help that people can offer!
>
> > David
--~--~---------~--~----~------------~-------~--~----~
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