Edgewall Software

Opened 10 years ago

Last modified 8 years ago

#11544 closed defect

Version argument in Resource object is ignored when initializing a WikiPage — at Initial Version

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

Description

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
4

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:

Change History (0)

Note: See TracTickets for help on using tickets.