Skip to content

Commit 7bb4574

Browse files
committed
remove list comprehension
1 parent 8441a0c commit 7bb4574

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/core/symlink.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def symlink_cnames(self, domain=None):
144144
if domain:
145145
domains = [domain]
146146
else:
147-
domains = [dom.domain for dom in Domain.objects.filter(project=self.project)]
147+
domains = Domain.objects.filter(project=self.project).values_list('domain', flat=True)
148148
for dom in domains:
149149
log_msg = 'Symlinking CNAME: {0} -> {1}'.format(dom, self.project.slug)
150150
log.info(constants.LOG_TEMPLATE.format(project=self.project.slug,

0 commit comments

Comments
 (0)