Skip to content

Fix data loss scenario when applying a feature addition delta on a layer with attributes having valid default values set to apply on update#1661

Merged
nirvn merged 4 commits into
masterfrom
default_value_data_loss_fix
Jun 16, 2026
Merged

Fix data loss scenario when applying a feature addition delta on a layer with attributes having valid default values set to apply on update#1661
nirvn merged 4 commits into
masterfrom
default_value_data_loss_fix

Conversation

@nirvn

@nirvn nirvn commented Jun 15, 2026

Copy link
Copy Markdown
Member

Fixes #1660 (explanation and sample project to reproduce data loss included in that issue).

Test case incoming.

Comment thread docker-qgis/qfc_worker/commands/apply_deltas.py Outdated

@suricactus suricactus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the nice issue report and the fix. Would you mind providing a test to ensure we never regress on this one?

@nirvn nirvn force-pushed the default_value_data_loss_fix branch from bff1c68 to c2d9379 Compare June 15, 2026 10:56
@suricactus

Copy link
Copy Markdown
Collaborator

@nirvn the tests are failing, but the their intention looks good!

@nirvn nirvn force-pushed the default_value_data_loss_fix branch 2 times, most recently from 8685a04 to f3dc6d5 Compare June 16, 2026 08:37
Comment thread docker-app/qfieldcloud/core/tests/test_delta.py
@nirvn nirvn force-pushed the default_value_data_loss_fix branch from ed1e298 to 7bb2470 Compare June 16, 2026 09:54
@nirvn nirvn force-pushed the default_value_data_loss_fix branch from 7bb2470 to 3c5f5dd Compare June 16, 2026 10:34
@nirvn nirvn merged commit fab8065 into master Jun 16, 2026
18 checks passed
@nirvn nirvn deleted the default_value_data_loss_fix branch June 16, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Applying feature addition delta will overwrite default values and lead to data loss

2 participants