Fix bug in canonical_name introduced with generic states

- Legacy-Id: 3694
This commit is contained in:
Ole Laursen 2011-11-24 10:49:16 +00:00
parent 9a8b9ea857
commit ed0d1ef0d0

View file

@ -166,7 +166,7 @@ class Document(DocumentInfo):
def canonical_name(self):
name = self.name
if self.type_id == "draft" and self.get_state() == "rfc":
if self.type_id == "draft" and self.get_state_slug() == "rfc":
a = self.docalias_set.filter(name__startswith="rfc")
if a:
name = a[0].name