qfieldsync
qfieldsync copied to clipboard
Error when synchronizing from QField when an "int" field has been cleared in QField
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...
The same thing happens on numeric and timestamp fields as well.