Bug report #16760

Relation reference widget: entries with a primary key of 0 initially display as a violation of the NOT NULL constraints

Added by Andreas Neumann almost 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Edit widget
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24659

Description

This concerns master (3.x):

Steps to reproduce:

1.
Load any layer (layer A) that allows setting up a relation reference widget with another non-geometry layer

2.
Load a second non-geometry layer (layer B) that has a primary key with integers and starts with zero

3.
Make sure that the initial value before the form opens in layer A and the field of the relation reference widget is set to 0

4.
Open the form of layer A - the form displays a violation of the NOT NULL constraint

5.
Oddly, if one changes to a different value other than 0 and then back to 0, the violation of the NOT NULL constraint is gone

Associated revisions

Revision d299c687
Added by Matthias Kuhn over 6 years ago

Fix NULL vs 0 issue in relation reference widget

Fix #16760 https://issues.qgis.org/issues/16760

History

#1 Updated by Anonymous over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF