Skip to content

Commit 1e336ef

Browse files
committed
Move comment
1 parent 9d3810f commit 1e336ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/relations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def use_pk_only_optimization(self):
8989

9090
def get_attribute(self, instance):
9191
if self.use_pk_only_optimization() and self.source_attrs:
92+
# Optimized case, return a mock object only containing the pk attribute.
9293
try:
93-
# Optimized case, return a mock object only containing the pk attribute.
9494
instance = get_attribute(instance, self.source_attrs[:-1])
9595
return PKOnlyObject(pk=instance.serializable_value(self.source_attrs[-1]))
9696
except AttributeError:

0 commit comments

Comments
 (0)