Capitalize the class field in database entries.

Some logfiles capitalize it and some don't.  It will now appear
consistently in the database and any database-derived pages.

That does not include recent.cgi, whose eventual status is still
undecided.
This commit is contained in:
John "Elwin" Edwards 2015-06-23 11:10:46 -04:00
parent 824fc6e7fd
commit 229bf38abd

View file

@ -501,6 +501,11 @@ class ARogueGame(Game):
fields = ["name", "score", "class", "xl", "fate", "depth", "endt"] fields = ["name", "score", "class", "xl", "fate", "depth", "endt"]
rankfields = ["rank", "score", "name", "class", "xl", "fate", "depth", "endt"] rankfields = ["rank", "score", "name", "class", "xl", "fate", "depth", "endt"]
pfields = ["score", "class", "xl", "fate", "depth", "endt"] pfields = ["score", "class", "xl", "fate", "depth", "endt"]
def postprocess(self, gamelist):
"Enforces consistent capitalization of the class title."
for d in gamelist:
d["class"] = d["class"].capitalize()
Game.postprocess(self, gamelist)
def getRecent(self, n=20): def getRecent(self, n=20):
return [] return []
def getPlayer(self, player): def getPlayer(self, player):