use straight typename if missing from mapping
This commit is contained in:
parent
dcd2d2bf4a
commit
ae61d19730
|
@ -57,7 +57,8 @@ class Document(Item, BasePublication):
|
|||
|
||||
@property
|
||||
def doctype_str(self):
|
||||
return typenames.MAPPING.get(self.doctype, u'Document (%s)' % self.doctype)
|
||||
if self.doctype is None: return _('Unknown')
|
||||
return typenames.MAPPING.get(self.doctype, self.doctype)
|
||||
|
||||
@property
|
||||
def reftitle(self):
|
||||
|
|
|
@ -179,7 +179,8 @@ class Dossier(Item, BasePublication):
|
|||
|
||||
@property
|
||||
def dostype_str(self):
|
||||
return typenames.MAPPING.get(self.dostype, u'Dossier (%s)' % self.dostype)
|
||||
if self.dostype is None: return _('Unknown')
|
||||
return typenames.MAPPING.get(self.dostype, self.dostype)
|
||||
|
||||
@property
|
||||
def state_str(self):
|
||||
|
|
|
@ -104,7 +104,8 @@ class Question(Item, BasePublication):
|
|||
|
||||
@property
|
||||
def questype_str(self):
|
||||
return typenames.MAPPING.get(self.questype, u'Question (%s)' % self.questype)
|
||||
if self.questype is None: return _('Unknown')
|
||||
return typenames.MAPPING.get(self.questype, self.questype)
|
||||
|
||||
@property
|
||||
def state_str(self):
|
||||
|
|
Reference in New Issue