Showing with 1 addition and 5 deletions.
  1. +1 −5 python/plugins/processing/algs/JoinAttributes.py
6 changes: 1 addition & 5 deletions python/plugins/processing/algs/JoinAttributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ def processAlgorithm(self, progress):
joinField2Index = layer2.fieldNameIndex(field2)

# Output
outFields = []
outFields.extend(provider.fields())
outFields.extend(provider2.fields())
outFields = vector.combineVectorFields(layer,layer2)

writer = output.getVectorWriter(outFields, provider.geometryType(),
layer.crs())
Expand All @@ -98,12 +96,10 @@ def processAlgorithm(self, progress):
attrs2 = inFeat2.attributes()
joinValue2 = attrs2[joinField2Index]
if joinValue1 == joinValue2:

# Create the new feature
outFeat.setGeometry(inGeom)
attrs.extend(attrs2)
break
outFeat.setAttributes(attrs)
writer.addFeature(outFeat)

del writer