File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 20
20
from readthedocs .core .utils import broadcast , slugify
21
21
# transitioning from v1 to v2, rename for now, remove later
22
22
from readthedocs .restapi .client import api
23
- from readthedocs .restapi .client import api as apiv2
24
23
from readthedocs .builds .constants import LATEST , LATEST_VERBOSE_NAME , STABLE
25
24
from readthedocs .projects import constants
26
25
from readthedocs .projects .exceptions import ProjectImportError
@@ -359,7 +358,7 @@ def get_builds_url(self):
359
358
360
359
def get_canonical_url (self ):
361
360
if getattr (settings , 'DONT_HIT_DB' , True ):
362
- return apiv2 .project (self .pk ).canonical_url ().get ()['url' ]
361
+ return api .project (self .pk ).canonical_url ().get ()['url' ]
363
362
return self .get_docs_url ()
364
363
365
364
def get_subproject_urls (self ):
@@ -370,7 +369,7 @@ def get_subproject_urls(self):
370
369
if getattr (settings , 'DONT_HIT_DB' , True ):
371
370
return [(proj ['slug' ], proj ['canonical_url' ])
372
371
for proj in (
373
- apiv2 .project (self .pk )
372
+ api .project (self .pk )
374
373
.subprojects ()
375
374
.get ()['subprojects' ])]
376
375
return [(proj .child .slug , proj .child .get_docs_url ())
You can’t perform that action at this time.
0 commit comments