classification
Title: "Delete patch set" review action doesn't work
Type: behavior Stage: resolved
Components: Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Oleg.Plakhotnyuk, eric.araujo, loewis
Priority: normal Keywords:

Created on 2011-11-20 14:51 by Oleg.Plakhotnyuk, last changed 2012-03-25 06:50 by eric.araujo. This issue is now closed.

Messages (2)
msg147994 - (view) Author: Oleg Plakhotnyuk (Oleg.Plakhotnyuk) * Date: 2011-11-20 14:51
I got following error when trying to delete outdated patch set:


Environment:

Request Method: POST
Request URL: http://bugs.python.org/review/13394/patchset/3680/delete
Django Version: 1.1.1 SVN-17047
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'gae2django',
 'rietveld_helper',
 'codereview']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'roundup_helper.middleware.LookupRoundupUser',
 'gae2django.middleware.FixRequestUserMiddleware',
 'rietveld_helper.middleware.AddUserToRequestMiddleware',
 'django.middleware.doc.XViewMiddleware')


Traceback:
File "/home/roundup/trackers/tracker/rietveld/django/core/handlers/base.py" in get_response
  88.                 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/home/roundup/trackers/tracker/rietveld/rietveld_helper/middleware.py" in process_view
  21.         response = view_func(request, *view_args, **view_kwargs)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in post_wrapper
  557.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in login_wrapper
  569.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in issue_wrapper
  643.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in patchset_wrapper
  706.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in patchset_owner_wrapper
  718.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in xsrf_wrapper
  597.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in delete_patchset
  1669.   for patchset in patchsets_after:
File "/home/roundup/trackers/tracker/rietveld/django/db/models/query.py" in _result_iter
  106.                 self._fill_cache()
File "/home/roundup/trackers/tracker/rietveld/django/db/models/query.py" in _fill_cache
  692.                     self._result_cache.append(self._iter.next())
File "/home/roundup/trackers/tracker/rietveld/django/db/models/query.py" in iterator
  238.         for row in self.query.results_iter():
File "/home/roundup/trackers/tracker/rietveld/django/db/models/sql/query.py" in results_iter
  287.         for rows in self.execute_sql(MULTI):
File "/home/roundup/trackers/tracker/rietveld/django/db/models/sql/query.py" in execute_sql
  2369.         cursor.execute(sql, params)
File "/home/roundup/trackers/tracker/rietveld/django/db/backends/util.py" in execute
  19.             return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /review/13394/patchset/3680/delete
Exception Value: schema "datetime" does not exist


Last trace frame's local vars exploration revealed this:
'SELECT "codereview_patchset"."id", "codereview_patchset"."gae_key", "codereview_patchset"."gae_parent_ctype_id", "codereview_patchset"."gae_parent_id", "codereview_patchset"."gae_ancestry", "codereview_patchset"."issue_id", "codereview_patchset"."message", "codereview_patchset"."data", "codereview_patchset"."url", "codereview_patchset"."owner_id", "codereview_patchset"."created", "codereview_patchset"."modified", "codereview_patchset"."n_comments" FROM "codereview_patchset" WHERE "codereview_patchset"."issue_id" = 13394 AND created > datetime.datetime(2011, 11, 20, 11, 36, 4, 343046)'

I believe that it should look something like this:
'SELECT ... AND created > %s' % datetime.datetime(2011, 11, 20, 11, 36, 4, 343046)

I'm not sure where should I post this issue. I didn't find "rietveld/django/db/backends/util.py" in sources at rietveld.googlecode.com, therefore I posted it here.
msg156734 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-25 06:50
Please use the tracker’s tracker for this bug (link at the bottom of the sidebar on the left).  Thanks.
History
Date User Action Args
2012-03-25 06:50:52eric.araujosetstatus: open -> closed

nosy: + eric.araujo
messages: + msg156734

resolution: not a bug
stage: resolved
2011-11-20 20:04:47ezio.melottisetnosy: + loewis
2011-11-20 14:51:29Oleg.Plakhotnyukcreate