You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls to _safe_join() fail when used on a model with a Meta.db_table value that contains characters that are not valid in a python identifier.
Scenario
When using Postgres as a database back end, it's not uncommon to use schema_name"."table_name when defining model db_table values to take advantage of Postgres schema features.
Models using this method cause an error when generating a temporary annotation name in _safe_join().
Suggested Solution
I believe normalizing the db_table name, and using a static prefix to avoid conflicts, should resolve the issue.
I can put together a PR to address this - is it something you would consider merging?
The text was updated successfully, but these errors were encountered:
Summary
Calls to
_safe_join()
fail when used on a model with aMeta.db_table
value that contains characters that are not valid in a python identifier.Scenario
When using Postgres as a database back end, it's not uncommon to use
schema_name"."table_name
when defining modeldb_table
values to take advantage of Postgres schema features.Models using this method cause an error when generating a temporary annotation name in
_safe_join()
.Suggested Solution
I believe normalizing the db_table name, and using a static prefix to avoid conflicts, should resolve the issue.
I can put together a PR to address this - is it something you would consider merging?
The text was updated successfully, but these errors were encountered: