Skip to content

Commit 00248a3

Browse files
Johnetordoffcslzchen
authored andcommitted
[Django Upgrade] Fix one sub-query slicing issue (#10012)
Co-authored-by: John Tordoff <>
1 parent 8204368 commit 00248a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

osf/models/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def registrations_all(self):
981981
def osfstorage_region(self):
982982
from addons.osfstorage.models import Region
983983
osfs_settings = self._settings_model('osfstorage')
984-
region_subquery = osfs_settings.objects.filter(owner=self.id).values('region_id')
984+
region_subquery = osfs_settings.objects.filter(owner=self.id).values_list('region_id', flat=True)[0]
985985
return Region.objects.get(id=region_subquery)
986986

987987
@property

0 commit comments

Comments
 (0)