Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
correct the 'home' count of used locations and accessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrasca committed Dec 23, 2015
1 parent d3b51ee commit 3ac80a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bauble/plugins/plants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,14 @@ def update(self):
"select count(*) from accession").first()
accuse, = ssn.execute(
"select count(distinct accession.id) from accession "
"join plant on plant.accession_id=accession.id").first()
"join plant on plant.accession_id=accession.id "
"where plant.quantity>0").first()
loctot, = ssn.execute(
"select count(*) from location").first()
locuse, = ssn.execute(
"select count(distinct location.id) from location "
"join plant on plant.location_id=location.id").first()
"join plant on plant.location_id=location.id "
"where plant.quantity>0").first()
self.widgets.splash_nplttot.set_text(str(plttot))
self.widgets.splash_npltuse.set_text(str(pltuse))
self.widgets.splash_nacctot.set_text(str(acctot))
Expand Down

0 comments on commit 3ac80a5

Please sign in to comment.