Skip to content

Commit da23da1

Browse files
committed
Tweaked Document.relations_that_doc() to accept unicode relationship strings, in order to let it be called from modules importing __future__.unicode_literals.
- Legacy-Id: 14124
1 parent 9f785c0 commit da23da1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/doc/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logging
55
import os
66
import rfc2html
7+
import six
78

89
from django.db import models
910
from django.core import checks
@@ -383,7 +384,7 @@ def all_relations_that(self, relationship, related=None):
383384

384385
def relations_that_doc(self, relationship):
385386
"""Return the related-document objects that describe a given relationship from self to other documents."""
386-
if isinstance(relationship, str):
387+
if isinstance(relationship, six.string_types):
387388
relationship = [ relationship ]
388389
if isinstance(relationship, tuple):
389390
relationship = list(relationship)

0 commit comments

Comments
 (0)