Skip to content

Commit

Permalink
Update comment in update_data_provider
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Kuhn <[email protected]>
  • Loading branch information
suricactus and m-kuhn authored Jan 12, 2024
1 parent 9d1ed3f commit f609537
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libqfieldsync/offliners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f609537

Please sign in to comment.