<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -489,7 +489,9 @@ class lob_filing:
             f = schema.lob_filing.select(where='id=$filing_id', limit=limit, offset=page*limit, vars=locals())
         else:
             f = schema.lob_filing.select(limit=limit, offset=page*limit)
-        return render.lob_filings(f,limit)
+
+        if not f: raise web.notfound()
+        return render.lob_filings(f, limit)
 
 class lob_contrib:
     def GET(self, filing_id):
@@ -499,6 +501,8 @@ class lob_contrib:
             c = schema.lob_contribution.select(where='filing_id=$filing_id', limit=limit, offset=page*limit, order='amount desc', vars=locals())
         else:
             c = schema.lob_contribution.select(limit=limit, offset=page*limit, order='amount desc')
+
+        if not c: raise web.notfound()
         return render.lob_contributions(c, limit)
 
 class lob_pac:
@@ -512,7 +516,9 @@ class lob_pac:
             p = schema.lob_pac.select(where='id=$pac_id',limit=limit, offset=page*limit, vars=locals())
         else:
             p = schema.lob_pac.select(limit=limit, offset=page*limit)
-        return render.lob_pacs(p,limit)
+
+        if not p: raise web.notfound()
+        return render.lob_pacs(p, limit)
 
 class lob_org:
     def GET(self, org_id):
@@ -523,6 +529,8 @@ class lob_org:
             o = schema.lob_organization.select(where='id=$org_id', limit=limit, offset=page*limit, order='name asc', vars=locals())
         else:
             o = schema.lob_organization.select(limit=limit, offset=page*limit, order='name asc')
+
+        if not o: raise web.notfound()
         return render.lob_orgs(o,limit)
 
 class lob_person:
@@ -534,7 +542,9 @@ class lob_person:
             p = schema.lob_person.select(where='id=$person_id', limit=limit, offset=page*limit, order='lastname asc', vars=locals())
         else:
             p = schema.lob_person.select(limit=limit, offset=page*limit, order='lastname asc')
-        return render.lob_person(p,limit)
+
+        if not p: raise web.notfound()
+        return render.lob_person(p, limit)
 
 class politician_introduced:
     def GET(self, politician_id):</diff>
      <filename>webapp.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c1daffd44b9ac46e0c8a5321324bf09add74d208</id>
    </parent>
  </parents>
  <author>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </author>
  <url>http://github.com/aaronsw/watchdog/commit/7a778d35504790e05de3e63463f22d08fd54a0be</url>
  <id>7a778d35504790e05de3e63463f22d08fd54a0be</id>
  <committed-date>2009-02-26T01:50:43-08:00</committed-date>
  <authored-date>2009-02-26T01:50:43-08:00</authored-date>
  <message>give 404 for wrong data to lobbyist urls</message>
  <tree>ed4c4c59d9b79a182d833d9e830269c9f2234df0</tree>
  <committer>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </committer>
</commit>
