Skip to content
Browse files

wiki: Replace error_on_different with error_on_name_normalized

  • Loading branch information...
1 parent 2fc82aa commit bd054a34a4beae937d223e1d4a09c86ddabc161e @andre-d andre-d committed with spladug Nov 29, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 r2/r2/controllers/validator/wiki.py
  2. +1 −1 r2/r2/controllers/wiki.py
View
6 r2/r2/controllers/validator/wiki.py
@@ -185,8 +185,8 @@ def __init__(self, fatal=False, *a, **kw):
VSrModerator.__init__(self, fatal=fatal, *a, **kw)
class VWikiPageName(Validator):
- def __init__(self, param, error_on_different=False, *a, **kw):
- self.error_on_different = error_on_different
+ def __init__(self, param, error_on_name_normalized=False, *a, **kw):
+ self.error_on_name_normalized = error_on_name_normalized
Validator.__init__(self, param, *a, **kw)
def run(self, page):
@@ -211,7 +211,7 @@ def run(self, page):
if WikiPage.is_impossible(page):
return self.set_error('INVALID_PAGE_NAME', code=400)
- if self.error_on_different and page != original_page:
+ if self.error_on_name_normalized and page != original_page:
self.set_error('PAGE_NAME_MOVED')
return page
View
2 r2/r2/controllers/wiki.py
@@ -77,7 +77,7 @@ class WikiController(RedditController):
@wiki_validate(pv=VWikiPageAndVersion(('page', 'v', 'v2'), required=False,
restricted=False, allow_hidden_revision=False),
- page_name=VWikiPageName('page', error_on_different=True))
+ page_name=VWikiPageName('page', error_on_name_normalized=True))
def GET_wiki_page(self, pv, page_name):
message = None

0 comments on commit bd054a3

Please sign in to comment.
Something went wrong with that request. Please try again.