Skip to content

Commit

Permalink
Make argument setting consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
dericke authored and nyalldawson committed Feb 20, 2021
1 parent 5302feb commit 0a3b7d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/plugins/processing/algs/gdal/OneSideBuffer.py
Expand Up @@ -125,6 +125,13 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

output, outputFormat = GdalUtils.ogrConnectionStringAndFormat(outFile, context)

other_fields_exist = any(
True for f in fields
if f.name() != geometry
)

other_fields = ',*' if other_fields_exist else ''

arguments = [
output,
ogrLayer,
Expand All @@ -133,13 +140,6 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
'-sql'
]

other_fields_exist = any(
True for f in fields
if f.name() != geometry
)

other_fields = ',*' if other_fields_exist else ''

if dissolve or fieldName:
sql = 'SELECT ST_Union(ST_SingleSidedBuffer({}, {}, {})) AS {}{} FROM "{}"'.format(geometry, distance, side, geometry, other_fields, layerName)
else:
Expand Down

0 comments on commit 0a3b7d3

Please sign in to comment.