Skip to content

Commit

Permalink
Minor Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Dec 17, 2024
1 parent 7747ada commit 77e9a3a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
6 changes: 1 addition & 5 deletions api/src/paths/analytics/observations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ export const GET: Operation = [
discriminator: 'ProjectPermission'
},
{
validSystemRoles: [SYSTEM_ROLE.DATA_ADMINISTRATOR],
discriminator: 'SystemRole'
},
{
validSystemRoles: [SYSTEM_ROLE.SYSTEM_ADMIN],
validSystemRoles: [SYSTEM_ROLE.SYSTEM_ADMIN, SYSTEM_ROLE.DATA_ADMINISTRATOR],
discriminator: 'SystemRole'
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const SamplingSiteListContent = (props: ISamplingSiteListContentProps) =>
return (
<>
{sampleSite.stratums && sampleSite.stratums.length > 0 && (
<Box display="flex" alignItems="center" color="textSecondary" py={1} px={1}>
<Box display="flex" alignItems="center" color="textSecondary" py={1} px={1.5}>
<SamplingStratumChips stratums={sampleSite.stratums} />
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export const SurveySpatialContainer = (): JSX.Element => {
...new Set(observationsDataLoader.data.surveyObservations.map((item) => item.itis_tsn))
].filter((tsn): tsn is number => tsn !== null);

if (!taxonomicIds.length) {
return;
}

await taxonomyContext.cacheSpeciesTaxonomyByIds(taxonomicIds);
}
};
Expand Down
5 changes: 5 additions & 0 deletions database/src/procedures/delete_survey_procedure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ export async function seed(knex: Knex): Promise<void> {
DELETE FROM survey_report_attachment
WHERE survey_id = p_survey_id;
DELETE FROM study_species_unit
WHERE study_species_unit_id IN (
SELECT study_species_unit_id FROM study_species WHERE survey_id = p_survey_id
);
DELETE FROM study_species
WHERE survey_id = p_survey_id;
Expand Down

0 comments on commit 77e9a3a

Please sign in to comment.