Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Simplify other_fields checker
- Loading branch information
Showing
with
5 additions
and
3 deletions.
-
+5
−3
python/plugins/processing/algs/gdal/OneSideBuffer.py
|
@@ -133,10 +133,12 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True): |
|
|
'-sql' |
|
|
] |
|
|
|
|
|
other_fields = ',*' if any( |
|
|
f for f in fields |
|
|
other_fields_exist = any( |
|
|
True for f in fields |
|
|
if f.name() != geometry |
|
|
) else '' |
|
|
) |
|
|
|
|
|
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) |
|
|