Modify

Opened 2 years ago

Closed 20 months ago

#10186 closed defect (fixed)

Logic on the settings page is backwards...

Reported by: sandinak Owned by: 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 (0)

Change History (5)

comment:1 Changed 2 years ago by rjollos

  • Cc rjollos added; anonymous removed

Is this plugin still maintained?

comment:2 Changed 2 years ago by anonymous

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

comment:3 Changed 2 years ago by rjollos

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

comment:4 Changed 2 years ago by kostia.lopuhin@…

  • 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

comment:5 Changed 20 months ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

Appears to be fixed in [11838].

Add Comment

Modify Ticket

Action
as closed The owner will remain sandinak.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.