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

DB Manager fails to dispay tables without PK #24412

Closed
qgib opened this issue May 3, 2017 · 2 comments
Closed

DB Manager fails to dispay tables without PK #24412

qgib opened this issue May 3, 2017 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented May 3, 2017

Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 16506
Affected QGIS version: master
Redmine category:db_manager


Current master fails to display table info for tables without a PK. If clicking on table preview first, the info is displayed.

if self.table.rowCount is not None or self.table.rowCount >= 0:
TypeError: unorderable types: NoneType() >= int()

TypeError: unorderable types: NoneType() >= int() 
Traceback (most recent call last):
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_manager.py", line 92, in itemChanged
    self.refreshTabs()
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_manager.py", line 141, in refreshTabs
    self.info.showInfo(item)
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/info_viewer.py", line 76, in showInfo
    self._showTableInfo(item)
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/info_viewer.py", line 135, in _showTableInfo
    html += table.info().toHtml()
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_plugins/info_model.py", line 361, in toHtml
    ret = self.getTableInfo()
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_plugins/postgis/info_model.py", line 230, in getTableInfo
    ret = TableInfo.getTableInfo(self)
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_plugins/info_model.py", line 296, in getTableInfo
    general_info = self.generalInfo()
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/db_manager/db_plugins/postgis/info_model.py", line 87, in generalInfo
    if self.table.rowCount is not None or self.table.rowCount >= 0:
TypeError: unorderable types: NoneType() >= int()

@qgib
Copy link
Contributor Author

qgib commented May 3, 2017

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Normal to High

@qgib
Copy link
Contributor Author

qgib commented Nov 15, 2017

Author Name: Salvatore Larosa (@slarosa)


Fixed in changeset f1c3692


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Nov 15, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant