[processing] Fix import to postgis alg when table name not set (fix #15869, 15097)

This commit is contained in:
Nyall Dawson 2016-11-22 09:57:50 +10:00
parent 3dcf03cf54
commit 271e67e37b

View File

@ -105,7 +105,7 @@ class ImportIntoPostGIS(GeoAlgorithm):
table.strip()
if not table or table == '':
table = layer.name()
table = "_".join(table.split(".")[:-1])
table = table.replace('.', '_')
table = table.replace(' ', '').lower()[0:62]
providerName = 'postgres'