mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-15 21:31:24 -05:00
[GH-ISSUE #3257] Impossible to delete a public resource policy #35770
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nonoss117 on GitHub (Jun 12, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/3257
Originally assigned to: @oschwartz10612 on GitHub.
Describe the Bug
Error when I try to delete a public resource policy
Environment
To Reproduce
When I want to delete a resource policy, I've got this error message:
I think this log is related to this issue:
Stack: SqliteError: FOREIGN KEY constraint failed at Statement.run (file:///app/dist/server.mjs:1270:19) at PreparedQuery.run (file:///app/node_modules/drizzle-orm/better-sqlite3/session.js:72:22) at QueryPromise.resultCb (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:119:64) at QueryPromise.execute (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:13:17) at QueryPromise.then (file:///app/node_modules/drizzle-orm/query-promise.js:21:17) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {"code":"SQLITE_CONSTRAINT_FOREIGNKEY"}Expected Behavior
Deleting a resource policy should be possible
@oschwartz10612 commented on GitHub (Jun 12, 2026):
Yeah that seems like a bug. Is it still associated with a resource? If you remove it first does it allow you to delete it?
@Nonoss117 commented on GitHub (Jun 12, 2026):
Thank you for your reply.
The policy is not associated to any resource. The screen capture confirme that.
@oschwartz10612 commented on GitHub (Jun 12, 2026):
Do you have any pincodes, passcodes, or rules on the policy? If so could you try removing them one by one and let me know which one allows it to delete? We are investigating this issue from the code side as well.
@Nonoss117 commented on GitHub (Jun 12, 2026):
I only have pincode. But when I try to unselect the pin code rule, and save settings I have this error:

and the same log message
@oschwartz10612 commented on GitHub (Jun 12, 2026):
Hum seems the policy is really messed up some how. Would you be able to provide larger log dump including doing both of these actions (deleteing and removing the pincode) when the server is in debug mode? You can change this in the config/config.yml file adding
log_level: debugunder theapp:section.@Nonoss117 commented on GitHub (Jun 12, 2026):
I have the log in debug mode. With first trying to delete pincode and after trying to delete the resource policy.
But how can I send you the file without posting it here and making the log "public" ?
Thank's
@oschwartz10612 commented on GitHub (Jun 12, 2026):
Could you email to support@pangolin.net?
@Nonoss117 commented on GitHub (Jun 12, 2026):
email sent.
Thank's again for your help