Error Code 4371*

I found this in one of Logan’s apps earlier

  query = db_defs.sign_location.all()
  query.filter( 'application_name =', application_name)
  query.filter( 'application_owner =', application_owner)
  query.filter( 'object_type =', 'server' )
  results = query.fetch(2)

  if len(results) > 2 :
      ##does stuff here...

So… ummm, you fetch two results and then test for greater than two. How’s that working for you?

.

*For those of you that don’t know or can’t remember Error Code 4371 is the Logan is a ReTaRd Error. It’s pretty common.

5 Responses to Error Code 4371*