mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
Wiki revisions: convert UUID to string
This commit is contained in:
@@ -1852,7 +1852,7 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
setattr(sr, field, value)
|
||||
if not wr:
|
||||
return True
|
||||
setattr(sr, id_field_name, str(wikipage.revision))
|
||||
setattr(sr, id_field_name, wikipage.revision)
|
||||
ModAction.create(sr, c.user, 'wikirevise', details=wiki.modactions.get(pagename))
|
||||
return True
|
||||
except ConflictException as e:
|
||||
|
||||
@@ -345,7 +345,7 @@ class WikiApiController(WikiController):
|
||||
# object. TODO: change this to minimize subreddit get sizes.
|
||||
if page.special:
|
||||
setattr(c.site, ATTRIBUTE_BY_PAGE[page.name], content)
|
||||
setattr(c.site, "prev_" + ATTRIBUTE_BY_PAGE[page.name] + "_id", str(page.revision))
|
||||
setattr(c.site, "prev_" + ATTRIBUTE_BY_PAGE[page.name] + "_id", page.revision)
|
||||
c.site._commit()
|
||||
|
||||
if page.special or c.is_wiki_mod:
|
||||
|
||||
@@ -350,7 +350,7 @@ class WikiPage(tdb_cassandra.Thing):
|
||||
self.content = content
|
||||
self.last_edit_by = author
|
||||
self.last_edit_date = wr.date
|
||||
self.revision = wr._id
|
||||
self.revision = str(wr._id)
|
||||
self._commit()
|
||||
return wr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user