Aaryan123456679 commented on code in PR #70793:
URL: https://github.com/apache/airflow/pull/70793#discussion_r3951464440
##########
airflow-core/src/airflow/utils/db.py:
##########
@@ -1104,11 +1104,20 @@ def reflect_tables(tables: list[MappedClassProtocol |
str] | None, session, sche
else:
for tbl in tables:
try:
- table_name = tbl if isinstance(tbl, str) else tbl.__tablename__
tbl_schema: str | None
- tbl_schema, sep, name = table_name.partition(".")
- if not sep:
- tbl_schema, name = None, table_name
+ if isinstance(tbl, str):
+ tbl_schema, sep, name = tbl.partition(".")
+ if not sep:
+ tbl_schema, name = None, tbl
+ else:
+ # A mapped class already carries its configured schema
(e.g. via
Review Comment:
Done — trimmed to a single line pointing readers at this PR for context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]