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

Fix: add missing trash suffix when getting by id #2156

Closed
wants to merge 2 commits into from

Conversation

timopollmeier
Copy link
Member

What

In init_get_iterator2_with be sure to add the "_trash" suffix on the table name when getting a single resource.

Why

Otherwise there's an SQL error, for example:

o m m '<get_scanners trash="1" scanner_id="6521a066-26cd-4019-af73-8f822ee6f833"/>'

fails, with

ERROR:  missing FROM-clause entry for table "scanners"
LINE 1: ...ST ('secret' AS TEXT)) FROM scanners_trash  WHERE scanners.i...
                                                             ^
 (7)

in the log.

References

Introduced in 2020 in c9dc67a in /pull/1076.

@timopollmeier timopollmeier requested a review from a team as a code owner March 14, 2024 10:21
Copy link
Contributor

mergify bot commented Mar 14, 2024

⚠️ The sha of the head commit of this PR conflicts with #2151. Mergify cannot evaluate rules on this PR. ⚠️

Copy link

Conventional Commits Report

Type Number
Bug Fixes 1

🚀 Conventional commits found.

@timopollmeier timopollmeier deleted the get-by-id-missing-trash branch September 27, 2024 09:50
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

Successfully merging this pull request may close these issues.

2 participants