I would like to import a GenericSetup upgrade profile that only makes sure that a certain registry record of type TextLine exists without overwriting any existing value. I can't find a way to do that.
If I provide an empty value then this value is set, even if I specify purge="false":
<record name="mypackage.myfield">
<field type="plone.registry.field.TextLine">
<title>My Field</title>
<required>False</required>
</field>
<value purge="false" />
</record>
I can see that the purge parameter is only used for lists, dicts and similar, so this is apparently not the way to go.
If I don't provide a value element then an existing value is cleared:
<record name="mypackage.myfield">
<field type="plone.registry.field.TextLine">
<title>My Field</title>
<required>False</required>
</field>
</record>
I would expect that not providing a value node would preserve any existing value, but it doesn't. So is there another way to achieve this?
I would like to import a GenericSetup upgrade profile that only makes sure that a certain registry record of type TextLine exists without overwriting any existing value. I can't find a way to do that.
If I provide an empty value then this value is set, even if I specify
purge="false":I can see that the purge parameter is only used for lists, dicts and similar, so this is apparently not the way to go.
If I don't provide a value element then an existing value is cleared:
I would expect that not providing a value node would preserve any existing value, but it doesn't. So is there another way to achieve this?