Ticket #13144 (closed Bug: fixed)
archetypes.querywidget raw get returns persistent querystring on .get(context, raw=True)
|Reported by:||jensens||Owned by:|
While using plone.app.collection we were need to get the raw querystring, modify it and pass it then to the QueryBuilder.
After adding a row to the raw querystring the addition was persisted. So each time the code was called the query grew and grew longer and stored in the DB.
To avoid it we used
rawquery = deepcopy(context.getQuery(raw=True))
As far as I understand modification must happen only on set of a field. A field must not return data which one can not modify without harm.
So I'd propose to return a deepcopy at https://github.com/plone/archetypes.querywidget/blob/master/archetypes/querywidget/field.py#L25