Mercurial > p > roundup > code
comparison roundup/cgi/actions.py @ 3581:d10008f756a4
fix saving of queries [SF#1436169]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 02 Mar 2006 23:51:08 +0000 |
| parents | f6719836e521 |
| children | ccf516e6c3f8 |
comparison
equal
deleted
inserted
replaced
| 3580:5c26b9bbd31a | 3581:d10008f756a4 |
|---|---|
| 1 #$Id: actions.py,v 1.58 2006-02-08 04:03:54 richard Exp $ | 1 #$Id: actions.py,v 1.59 2006-03-02 23:51:08 richard Exp $ |
| 2 | 2 |
| 3 import re, cgi, StringIO, urllib, Cookie, time, random, csv, codecs | 3 import re, cgi, StringIO, urllib, Cookie, time, random, csv, codecs |
| 4 | 4 |
| 5 from roundup import hyperdb, token, date, password | 5 from roundup import hyperdb, token, date, password |
| 6 from roundup.i18n import _ | 6 from roundup.i18n import _ |
| 190 # ok, so there's not a private query for the current user | 190 # ok, so there's not a private query for the current user |
| 191 # - see if there's one created by them | 191 # - see if there's one created by them |
| 192 qids = self.db.query.filter(None, {'name': old_queryname, | 192 qids = self.db.query.filter(None, {'name': old_queryname, |
| 193 'creator': uid}) | 193 'creator': uid}) |
| 194 | 194 |
| 195 if qids: | 195 if qids and old_queryname: |
| 196 # edit query - make sure we get an exact match on the name | 196 # edit query - make sure we get an exact match on the name |
| 197 for qid in qids: | 197 for qid in qids: |
| 198 if old_queryname != self.db.query.get(qid, 'name'): | 198 if old_queryname != self.db.query.get(qid, 'name'): |
| 199 continue | 199 continue |
| 200 if not self.hasPermission('Edit', 'query', itemid=qid): | 200 if not self.hasPermission('Edit', 'query', itemid=qid): |
