summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorRamonWill <ramonwilliams@hotmail.co.uk>2020-04-28 14:19:06 -0400
committersqla-tester <sqla-tester@sqlalchemy.org>2020-04-28 14:19:06 -0400
commitf554209ebd676fd7c30e4c494a42a049d8afd3f0 (patch)
tree382411fce85e499cccd18b3a954e30765fd9beb2 /test/dialect/postgresql/test_compiler.py
parentd43192cf986a192ecd8d34cb8fe845b7121cdb05 (diff)
downloadsqlalchemy-f554209ebd676fd7c30e4c494a42a049d8afd3f0.tar.gz
fixes #4212 raise an error if selectable and flat/aliased are sent to with_polymorphic simultaenously
<!-- Provide a general summary of your proposed changes in the Title field above --> Hi, This is a proposed fix for Issue #4212 When the selectable argument is passed to with_polymorphic it is already aliased. Therefore an argument error should be raised if flat is also True. I have added an if statement to the with_polymorphic function, that raises an Argument Error if selectable is none/False AND if flat=True. I have also included a test. ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [X ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. Kind Regards, Ramon Closes: #5232 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5232 Pull-request-sha: eae20cdadac82ca1e0352000fe0211e20b590e8b Change-Id: I49c3022296608ede43de7f508fa993fa97dda81a
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions