Skip to content

Commit

Permalink
[#141] Replaced len() with .count() on qs
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Jun 27, 2014
1 parent 4029343 commit 58874e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion akvo/rsr/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def delete(self, *args, **kwargs):
location_target = self.location_target
other_locations = location_target.locations.all()

if len(other_locations) > 0:
if other_locations.count() > 0:
location_target.primary_location = other_locations.first()
else:
location_target.primary_location = None
Expand Down

0 comments on commit 58874e7

Please sign in to comment.