Skip to content

Commit 9abbb6f

Browse files
committed
backward compatibility django shim
1 parent 40d38ee commit 9abbb6f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

codespeed/models.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
from django.urls import reverse
1010
from django.conf import settings
1111
from django.db import models
12-
from django.utils.encoding import python_2_unicode_compatible
12+
try:
13+
from django.utils.encoding import python_2_unicode_compatible
14+
except ImportError:
15+
def python_2_unicode_compatible(arg):
16+
return arg
1317

1418
from .commits.github import GITHUB_URL_RE
1519

0 commit comments

Comments
 (0)