I'm not too sure what I was doing with awfully implemented exception handling in helpsys models.py. Yank that nasty stuff.

This commit is contained in:
Greg Taylor 2009-01-18 04:58:10 +00:00
parent 0169c52442
commit 5d7fcb67dd

View file

@ -27,19 +27,13 @@ class HelpEntry(models.Model):
"""
Returns the topic's name.
"""
try:
return self.topicname
except:
return None
return self.topicname
def get_entrytext_ingame(self):
"""
Gets the entry text for in-game viewing.
"""
try:
return ansi.parse_ansi(self.entrytext)
except:
return None
return ansi.parse_ansi(self.entrytext)
class HelpEntryAdmin(admin.ModelAdmin):
list_display = ('id', 'topicname', 'staff_only')