diff --git a/libqfieldsync/offliners.py b/libqfieldsync/offliners.py index 1e31878..1c9ccc0 100644 --- a/libqfieldsync/offliners.py +++ b/libqfieldsync/offliners.py @@ -296,9 +296,8 @@ def update_data_provider(layer: QgsVectorLayer, source: str) -> None: layer.setCustomProperty(CUSTOM_PROPERTY_ORIGINAL_LAYERID, layer.id()) layer.setCustomProperty(CUSTOM_PROPERTY_LAYERNAME_SUFFIX, "") - # TODO: review this code, why do we connect defaultvalueclause to not null constraints? - # - # remove constrainst of fields that use defaultValueClauses from provider on original + # Remove constraints from fields that have a default value provided by the "online" provider. + # Example: a user should not be forced to enter an autogenerated primary key in offline mode, compare https://github.com/qgis/QGIS/issues/28122 not_null_field_names = [] source_fields = layer.fields() for field in source_fields: