Skip to content

Commit

Permalink
Fix server WFS-T 1.1.0 wrong case in transaction response
Browse files Browse the repository at this point in the history
Fixes #38558

(cherry picked from commit aa79a84)
  • Loading branch information
elpaso authored and nyalldawson committed Oct 23, 2020
1 parent 66dc90c commit 6d17ac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/server/services/wfs/qgswfstransaction.cpp
Expand Up @@ -184,19 +184,19 @@ namespace QgsWfs
QDomElement summaryElem = doc.createElement( QStringLiteral( "TransactionSummary" ) );
if ( aRequest.inserts.size() > 0 )
{
QDomElement totalInsertedElem = doc.createElement( QStringLiteral( "TotalInserted" ) );
QDomElement totalInsertedElem = doc.createElement( QStringLiteral( "totalInserted" ) );
totalInsertedElem.appendChild( doc.createTextNode( QString::number( totalInserted ) ) );
summaryElem.appendChild( totalInsertedElem );
}
if ( aRequest.updates.size() > 0 )
{
QDomElement totalUpdatedElem = doc.createElement( QStringLiteral( "TotalUpdated" ) );
QDomElement totalUpdatedElem = doc.createElement( QStringLiteral( "totalUpdated" ) );
totalUpdatedElem.appendChild( doc.createTextNode( QString::number( totalUpdated ) ) );
summaryElem.appendChild( totalUpdatedElem );
}
if ( aRequest.deletes.size() > 0 )
{
QDomElement totalDeletedElem = doc.createElement( QStringLiteral( "TotalDeleted" ) );
QDomElement totalDeletedElem = doc.createElement( QStringLiteral( "totalDeleted" ) );
totalDeletedElem.appendChild( doc.createTextNode( QString::number( totalDeleted ) ) );
summaryElem.appendChild( totalDeletedElem );
}
Expand Down
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsserver_wfs.py
Expand Up @@ -516,7 +516,7 @@ def _round_trip(value, field, version='1.1.0'):
if version == '1.0.0':
self.assertTrue(b'<SUCCESS/>' in body, body)
else:
self.assertTrue(b'<TotalUpdated>1</TotalUpdated>' in body, body)
self.assertTrue(b'<totalUpdated>1</totalUpdated>' in body, body)
header, body = self._execute_request("?MAP=%s&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=cdb_lines&FEATUREID=cdb_lines.22" % (
self.testdata_path + 'test_project_wms_grouped_layers.qgs'))
if value is not None:
Expand Down Expand Up @@ -550,7 +550,7 @@ def _round_trip(value, field, version='1.1.0'):
if version == '1.0.0':
self.assertTrue(b'<ERROR/>' in body, body)
else:
self.assertTrue(b'<TotalUpdated>0</TotalUpdated>' in body)
self.assertTrue(b'<totalUpdated>0</totalUpdated>' in body)
self.assertTrue(b'<Message>NOT NULL constraint error on layer \'cdb_lines\', field \'name\'</Message>' in body, body)

def test_describeFeatureTypeGeometryless(self):
Expand Down

0 comments on commit 6d17ac8

Please sign in to comment.