qfieldsync icon indicating copy to clipboard operation
qfieldsync copied to clipboard

Error when synchronizing from QField when an "int" field has been cleared in QField

Open gioman opened this issue 4 years ago • 1 comments

Qfield Sync: 4.0.0-BETA8 v3.4.4

QField: 2.0.2 Beta3

QGIS: master 3.20

Take a project with a PostGIS layer with an "int" field (filled), make it offline and port it to QField.

In QField edit an existing feature and clear the "int" field.

Try synchronize basck to PostGIS with QFieldSync, it will fail as it will try to update the feature with something like

UPDATE "schemaname"."tablename" SET "columnname"='' WHERE "i...

instead of something like

UPDATE "schemaname"."tablename" SET "columnname"=NULL WHERE "i...

gioman avatar Aug 06 '21 18:08 gioman

The same thing happens on numeric and timestamp fields as well.

paschendale avatar Jan 25 '22 20:01 paschendale