Open esnyder-rve opened 1 week ago
Found the issue. I made a memory layer with text fields of various lengths and got this issue: | Field | Length | Issue? |
---|---|---|---|
A | 254 | No | |
B | 128 | No | |
C | 64 | No | |
D | 32 | Yes | |
E | 38 | No | |
F | 37 | Yes |
This issue is not present in the current LTR version.
@esnyder-rve, thanks for reporting. The provided steps are enough to replicate the issue even using QGIS 3.38. The issue occurs using QGIS >= 3.38, while it doesn't occur using QGIS <= 3.36.
Hi @elpaso, may you have a look at this? Is it possible that the issue may have been triggered by https://github.com/qgis/QGIS/pull/57690?
What is the bug or the crash?
For some reason, the NULL value is not retained correctly (see steps for more details). What's odd is that this is not consistent. Some attributes don't have this issue, others do. My data is stored in a PostGIS table, where the field is allowed to be NULL (I checked). When running a
SELECT DISTINCT
the resulting values are correct (with NULL showing as NULL, and not what garbage QGIS is showing).However, QGIS is insisting that the value is that uuid string as shown here when the value map widget is setup (it should be NULL):
Steps to reproduce the issue
Versions
Supported QGIS version
New profile
Additional context
At first, I thought it displayed the first value of the Display field for the layer (like how the expression editor shows for the feature preview). However, when I change the display field, this garbage value does not change when deleting and re-adding the NULL option.