Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix: Fix api_set_context migration. #1181

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/features/surveys/components/SamplingMethodForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const SamplingMethodForm = () => {
)}
<Stack component={TransitionGroup} gap={1.5}>
{values.methods.map((item, index) => (
<Collapse key={`sample_method_${item.method_lookup_id}_${item.periods.length}`}>
<Collapse key={`sample_method_${item.method_lookup_id || Math.random()}`}>
<Card
variant="outlined"
sx={{
Expand Down Expand Up @@ -189,7 +189,7 @@ const SamplingMethodForm = () => {
<List dense disablePadding>
{item.periods.map((period) => (
<ListItem
key={`sample_period_${period.survey_sample_period_id}`}
key={`sample_period_${period.survey_sample_period_id || Math.random()}`}
divider
disableGutters
sx={{ pl: 1.25 }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { Knex } from 'knex';
*/
export async function up(knex: Knex): Promise<void> {
await knex.raw(`
SET search_path = 'biohub';

DROP FUNCTION IF EXISTS api_set_context;

CREATE OR REPLACE FUNCTION api_set_context(p_system_user_guid system_user.user_guid%type, p_user_identity_source_name user_identity_source.name%type) RETURNS system_user.system_user_id%type
Expand Down
Loading