Skip to content

Commit 46a96ed

Browse files
ndg63276Mark Williams
andauthored
LIMS-1289: Fix sample and pdb count on protens page (#753)
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent 627b38a commit 46a96ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/src/Page/Sample.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class Sample extends Page
180180
array('/proteins(/:pid)', 'get', '_proteins'),
181181
array('/proteins', 'post', '_add_protein'),
182182
array('/proteins/:pid', 'patch', '_update_protein'),
183-
array('/proteins/distinct', 'get', '_disinct_proteins'),
183+
array('/proteins/distinct', 'get', '_distinct_proteins'),
184184

185185
array('/proteins/lattice(/:lid)', 'get', '_protein_lattices'),
186186
array('/proteins/lattice', 'post', '_add_protein_lattice'),
@@ -1759,10 +1759,10 @@ function _proteins()
17591759
IF(pr.externalid IS NOT NULL, 1, 0) as external,
17601760
HEX(pr.externalid) as externalid,
17611761
pr.density,
1762-
count(php.proteinid) as pdbs,
1762+
count(distinct php.pdbid) as pdbs,
17631763
pr.safetylevel,
1764-
count(dc.datacollectionid) as dcount,
1765-
count(b.blsampleid) as scount
1764+
count(distinct dc.datacollectionid) as dcount,
1765+
count(distinct b.blsampleid) as scount
17661766
17671767
FROM protein pr
17681768
LEFT OUTER JOIN concentrationtype ct ON ct.concentrationtypeid = pr.concentrationtypeid
@@ -1792,7 +1792,7 @@ function _proteins()
17921792

17931793
# ------------------------------------------------------------------------
17941794
# Return distinct proteins for a proposal
1795-
function _disinct_proteins()
1795+
function _distinct_proteins()
17961796
{
17971797
if (!$this->has_arg('prop'))
17981798
$this->_error('No proposal specified');

0 commit comments

Comments
 (0)