3liz / qgis-pgmetadata-plugin

QGIS Plugin to manage some metadata from PostgreSQL layer
GNU General Public License v2.0
12 stars 10 forks source link

Bugfix incorrect warning about invalid connections (issue #137) #138

Closed effjot closed 1 year ago

effjot commented 1 year ago

In add_connection(), there’s an ugly hack for marking settings strings with the new separatore (“Adding the separator at the beginning is an ugly hack to tell new and old strings apart”). In validate_connections_names(), the settings string is split by the separator, yielding an empty string as the first element. This in turn is added to the invalid list.

With this fix, validate_connections_names() ignores the first element, looking only at the “real” connections.

Also, I’ve added a call to migrate_connection_name_separator() at the beginning of validate_connections_names(), because validate_connections_names() is called quite early in the startup process.

Fixes #137

effjot commented 1 year ago

I hope it works now, but please have an independent look ;-)