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

Device create doesn't work #4

Open
barribarrier opened this issue Jan 11, 2024 · 0 comments
Open

Device create doesn't work #4

barribarrier opened this issue Jan 11, 2024 · 0 comments

Comments

@barribarrier
Copy link

image

openbalena-db log:

2024-01-11 12:43:50.610 UTC [67210] ERROR:  null value in column "device" of relation "service install" violates not-null constraint
2024-01-11 12:43:50.610 UTC [67210] DETAIL:  Failing row contains (2024-01-11 12:43:50.610567, 2024-01-11 12:43:50.610567, null, 11, 163).
2024-01-11 12:43:50.610 UTC [67210] STATEMENT:  WITH pgrst_source AS (WITH pgrst_payload AS (SELECT $1::json AS json_data), pgrst_body AS ( SELECT CASE WHEN json_typeof(json_data) = 'array' THEN json_data ELSE json_build_array(json_data) END AS val FROM pgrst_payload) INSERT INTO "public"."service install"("installs-service") SELECT "installs-service" FROM json_populate_recordset (null::"public"."service install", (SELECT val FROM pgrst_body)) _  RETURNING "public"."service install".*) SELECT '' AS total_result_set, pg_catalog.count(_postgrest_t) AS page_total, CASE WHEN pg_catalog.count(_postgrest_t) = 1 THEN coalesce((
	  WITH data AS (SELECT row_to_json(_) AS row FROM pgrst_source AS _ LIMIT 1)
	  SELECT array_agg(json_data.key || '=' || coalesce('eq.' || json_data.value, 'is.null'))
	  FROM data CROSS JOIN json_each_text(data.row) AS json_data
	  WHERE json_data.key IN ('id')
	), array[]::text[]) ELSE array[]::text[] END AS header, coalesce(string_agg(to_json(_postgrest_t)::text, ','), '')::character varying AS body, nullif(current_setting('response.headers', true), '') AS response_headers, nullif(current_setting('response.status', true), '') AS response_status FROM (SELECT "pgrst_source".*FROM "pgrst_source"    ) _postgrest_t
2024-01-11 12:43:50.639 UTC [67210] ERROR:  null value in column "device" of relation "service install" violates not-null constraint
2024-01-11 12:43:50.639 UTC [67210] DETAIL:  Failing row contains (2024-01-11 12:43:50.63928, 2024-01-11 12:43:50.63928, null, 12, 164).
2024-01-11 12:43:50.639 UTC [67210] STATEMENT:  WITH pgrst_source AS (WITH pgrst_payload AS (SELECT $1::json AS json_data), pgrst_body AS ( SELECT CASE WHEN json_typeof(json_data) = 'array' THEN json_data ELSE json_build_array(json_data) END AS val FROM pgrst_payload) INSERT INTO "public"."service install"("installs-service") SELECT "installs-service" FROM json_populate_recordset (null::"public"."service install", (SELECT val FROM pgrst_body)) _  RETURNING "public"."service install".*) SELECT '' AS total_result_set, pg_catalog.count(_postgrest_t) AS page_total, CASE WHEN pg_catalog.count(_postgrest_t) = 1 THEN coalesce((
	  WITH data AS (SELECT row_to_json(_) AS row FROM pgrst_source AS _ LIMIT 1)
	  SELECT array_agg(json_data.key || '=' || coalesce('eq.' || json_data.value, 'is.null'))
	  FROM data CROSS JOIN json_each_text(data.row) AS json_data
	  WHERE json_data.key IN ('id')
	), array[]::text[]) ELSE array[]::text[] END AS header, coalesce(string_agg(to_json(_postgrest_t)::text, ','), '')::character varying AS body, nullif(current_setting('response.headers', true), '') AS response_headers, nullif(current_setting('response.status', true), '') AS response_status FROM (SELECT "pgrst_source".*FROM "pgrst_source"    ) _postgrest_t
2024-01-11 12:43:50.667 UTC [67210] ERROR:  null value in column "device" of relation "service install" violates not-null constraint
2024-01-11 12:43:50.667 UTC [67210] DETAIL:  Failing row contains (2024-01-11 12:43:50.66729, 2024-01-11 12:43:50.66729, null, 13, 165).
2024-01-11 12:43:50.667 UTC [67210] STATEMENT:  WITH pgrst_source AS (WITH pgrst_payload AS (SELECT $1::json AS json_data), pgrst_body AS ( SELECT CASE WHEN json_typeof(json_data) = 'array' THEN json_data ELSE json_build_array(json_data) END AS val FROM pgrst_payload) INSERT INTO "public"."service install"("installs-service") SELECT "installs-service" FROM json_populate_recordset (null::"public"."service install", (SELECT val FROM pgrst_body)) _  RETURNING "public"."service install".*) SELECT '' AS total_result_set, pg_catalog.count(_postgrest_t) AS page_total, CASE WHEN pg_catalog.count(_postgrest_t) = 1 THEN coalesce((
	  WITH data AS (SELECT row_to_json(_) AS row FROM pgrst_source AS _ LIMIT 1)
	  SELECT array_agg(json_data.key || '=' || coalesce('eq.' || json_data.value, 'is.null'))
	  FROM data CROSS JOIN json_each_text(data.row) AS json_data
	  WHERE json_data.key IN ('id')
	), array[]::text[]) ELSE array[]::text[] END AS header, coalesce(string_agg(to_json(_postgrest_t)::text, ','), '')::character varying AS body, nullif(current_setting('response.headers', true), '') AS response_headers, nullif(current_setting('response.status', true), '') AS response_status FROM (SELECT "pgrst_source".*FROM "pgrst_source"    ) _postgrest_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant