Proteus behaves different than GUI?

While working on this issue quoted below, I added a doc-test to check this regression. Anyhow, while this test does the same as in the GUI (create a Member, add a party, save the member; no other data entered), the doc-test does not fail: After saving member1.code is None, while when using the GUI, it is the empty string.

Is this intented behavior? Anything missing in my regression-test?

This is the doc-test to check the regression (shortened here, but you get the idea):

Create first member::

   >>> Member = Model.get('association.member')
   >>> member1 = Member()
   >>> = party1

Create a second member - this failed due to ``code`` being an empty
string instead of ``NULL``::

   >>> member2 = Member()
   >>> = party2

I would expect to fail, as it would when adding a new “Member” in the GUI. Anyhow it does not.

GUI can not display None as code can.

That’s fine. But why is the code an empty string when saving via GUI, but None when saving via proteus? I’d expect both to create the same value (no matter which one, as long at it is the same)

Because we can with proteus and can not with GUI.