mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:37:07 +00:00
Let the user set the search path to no survey.
This is so that we can access tables in the `public` schema which are overloaded by survey tables, as is the case with `info`.
This commit is contained in:
@@ -32,7 +32,11 @@ async function setSurvey (projectId, client) {
|
||||
if (!client) {
|
||||
client = await pool.connect();
|
||||
}
|
||||
await client.query("CALL set_survey($1);", [projectId]);
|
||||
if (projectId) {
|
||||
await client.query("CALL set_survey($1);", [projectId]);
|
||||
} else {
|
||||
await client.query("SET search_path TO public;");
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user