Edgewall Software

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#11544 closed defect (fixed)

Version argument in Resource object is ignored when initializing a WikiPage

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.1.2
Component: wiki system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

WikiPage __init__ method uses resource.version when version parameter is None. An invalid version or Resource.version is coerced to None.

Internal Changes:


The version of the Resource object is ignored when initializing a WikiPage object.

Python 2.7.4 (default, Sep 26 2013, 03:20:26) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from trac.env import Environment
>>> from trac.resource import Resource
>>> from trac.wiki.model import WikiPage
>>> env = Environment('/home/user/Workspace/t11518/tracdev')
>>> resource = Resource('wiki', 'WikiStart', 1)
>>> page = WikiPage(env, resource)
>>> page.version

This was previously discussed in comment:4:ticket:11518. It was suggested to also allow the version parameter to take precedence over Resource.version, which would preserve existing behavior.

We should also:

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 9 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:2 by Ryan J Ollos, 9 years ago

Proposed changes in log:rjollos.git:t11544.

comment:3 by Ryan J Ollos, 9 years ago

API Changes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to trunk in [12659].

comment:4 by Ryan J Ollos, 8 years ago

API Changes: modified (diff)

comment:5 by Ryan J Ollos, 7 years ago

#12273 closed as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.