Ticket #10186 (closed defect: fixed)

Opened 10 months ago

Last modified 1 week ago

Logic on the settings page is backwards...

Reported by: sandinak Assigned to: sandinak
Priority: normal Component: TracAjaxCommentsPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.12

Description

Is:

 if req.args.get('enabled'):
                    req.session[self.session_field] = 'False'

should be :

 if not req.args.get('enabled'):
                    req.session[self.session_field] = 'False'

Attachments

Change History

07/26/12 00:06:39 changed by rjollos

  • cc set to rjollos.

Is this plugin still maintained?

07/26/12 00:20:33 changed by anonymous

yer about to do it to me again aren't you .. ;-) .. I'll submit ticket and mail...

07/26/12 00:37:05 changed by rjollos

Well, if you keeping fixing bugs at the rate you have been, then you're asking for it ;)

07/26/12 07:18:42 changed by kostia.lopuhin@gmail.com

  • owner changed from kostialopuhin to sandinak.

Hmm looks really strange. If you change it, you also should change the previous line, so the whole change would be:

from

51     req.session[self.session_field] = 'True'
52     if req.args.get('enabled'):
53         req.session[self.session_field] = 'False'

to

51     req.session[self.session_field] = str(bool(req.args.get('enabled', False))

but you should test)

I think I just copied that code from some example, and maybe made some mistakes along the way, don't remember writing it ;)

As for another part - I will answer in #10187

05/16/13 02:23:37 changed by rjollos

  • status changed from new to closed.
  • resolution set to fixed.

Appears to be fixed in [11838].


Add/Change #10186 (Logic on the settings page is backwards...)




Change Properties
Action