Skip to content

Commit

Permalink
Don't try to translate boolean object
Browse files Browse the repository at this point in the history
Fix #58025
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Jul 9, 2024
1 parent 536316b commit 75d8355
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/oracle/info_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def generalInfo(self):
self.table.blockSignals(False)

relation_type = QApplication.translate(
"DBManagerPlugin", self.table.objectType)
"DBManagerPlugin", self.table.objectType) if isinstance(self.table.objectType, str) else QApplication.translate("DBManagerPlugin", "Unknown")

tbl = [
(QApplication.translate("DBManagerPlugin", "Object type:"),
Expand Down
7 changes: 6 additions & 1 deletion python/plugins/db_manager/db_plugins/oracle/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
"""

# this will disable the dbplugin if the connector raise an ImportError
from typing import (
Optional,
Union
)

from .connector import OracleDBConnector

from qgis.PyQt.QtCore import Qt, QCoreApplication
Expand Down Expand Up @@ -282,7 +287,7 @@ def __init__(self, row, db, schema=None):
self.name, self.owner, isView = row

self.estimatedRowCount = None
self.objectType = None
self.objectType: Optional[Union[str, bool]] = None
self.isView = False
self.isMaterializedView = False
if isView == 1:
Expand Down

0 comments on commit 75d8355

Please sign in to comment.