Skip to content

Commit

Permalink
Issue 38083: PK calculations in Panorama don't render if SubGroup ann…
Browse files Browse the repository at this point in the history
…otation isn't present (LabKey#37)

Also, don't log NPE if audit log isn't available during import
  • Loading branch information
labkey-jeckels authored Jul 26, 2019
1 parent 61772ae commit c96418d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/queries/targetedms/Pharmacokinetics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SELECT
sub.PeptideId,
sub.MoleculeId,
sub.Time,
sub.SubGroup,
COALESCE(sub.SubGroup, 'Default') AS SubGroup,
(CASE WHEN MAX(sub.Dose)= MIN(sub.Dose) THEN MAX(sub.Dose) ELSE NULL END) AS Dose,
(CASE WHEN MAX(sub.DoseUnits)= MIN(sub.DoseUnits) THEN MAX(sub.DoseUnits) ELSE NULL END) AS DoseUnits,
(CASE WHEN MAX(sub.ROA)= MIN(sub.ROA) THEN MAX(sub.ROA) ELSE NULL END) AS ROA,
Expand Down
5 changes: 2 additions & 3 deletions src/org/labkey/targetedms/SkylineAuditLogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.labkey.targetedms.parser.skyaudit.AuditLogMessageExpander;
import org.labkey.targetedms.parser.skyaudit.AuditLogParsingException;
import org.labkey.targetedms.parser.skyaudit.AuditLogTree;
import org.labkey.targetedms.parser.skyaudit.DatabaseUtil;
import org.labkey.targetedms.parser.skyaudit.SkylineAuditLogParser;
import org.labkey.targetedms.parser.skyaudit.SkylineAuditLogSecurityManager;
import org.labkey.targetedms.parser.skyaudit.TestRun;
Expand Down Expand Up @@ -122,6 +121,7 @@ private boolean verifyPreRequisites(AuditLogImportContext pContext) throws Audit
if(pContext._logFile == null || !pContext._logFile.exists()){
if(_securityMgr.getIntegrityLevel() == SkylineAuditLogSecurityManager.INTEGRITY_LEVEL.ANY){
_logger.warn("Log file is missing. Proceeding without the log.");
return false;
}
else
throw new AuditLogException("Current log integrity setting do not allow to upload a file without a valid audit log. ");
Expand Down Expand Up @@ -154,8 +154,7 @@ private boolean verifyPreRequisites(AuditLogImportContext pContext) throws Audit
.append(" ")
.append(docFilter.getSQLFragment(TargetedMSManager.getSqlDialect()));

Integer res = new SqlSelector(TargetedMSManager.getSchema(), query).getObject(Integer.class);
Integer docCount = (Integer)res;
Integer docCount = new SqlSelector(TargetedMSManager.getSchema(), query).getObject(Integer.class);
pContext._logTree = buildLogTree(pContext._documentGUID);

//verify that the tree is not empty
Expand Down

0 comments on commit c96418d

Please sign in to comment.