Fixed undefined user ID in postgres function. Fixed and improved mobile alignment for new and stash icons on scene tile.
This commit is contained in:
@@ -1157,7 +1157,8 @@ exports.up = knex => Promise.resolve()
|
||||
// allow vim fold
|
||||
return knex.raw(`
|
||||
CREATE FUNCTION current_user_id() RETURNS INTEGER AS $$
|
||||
SELECT current_setting('user.id', true)::integer;
|
||||
/* if the user ID is undefined, the adapter will pass it as a string, which cannot be cast as NULL by ::integer */
|
||||
SELECT NULLIF(current_setting('user.id', true), '')::integer;
|
||||
$$ LANGUAGE SQL STABLE;
|
||||
|
||||
/* We need both the release entries and their search ranking, and PostGraphile does not seem to allow virtual foreign keys on function results.
|
||||
|
||||
Reference in New Issue
Block a user