[ckan-dev] allow_partial_updates - issues with demo site - where should we be going?
Toby Dacre
toby.okfn at gmail.com
Thu Jul 12 07:51:32 UTC 2012
Hi,
With the demo site we are using package_update action
we are using allow_partial_updates when we are doing the updates - this is
great for things like not loosing all our resources when we update a
package however it also means that we cannot for example remove all our
tags as an empty tags is seen as non-existent and so the tags are not
updated
What I would prefer is that tags is in pkg_dict we would update it but if
it wasn't we wouldn't
the problem with this is that form data is validated and an empty tag is
removed from that data - then when we are in the update missing tag data
ends up becoming [ ]
It seems to me that tags = [ ] should not be seen as empty by validation
whereas no tags in the data should be
then when processing the update we should not convert None -> [ ]
If we do that then this would work well for the demo site but I'm not sure
what/how much we would break
The other option would be for me to add a more modular
allow_partial_updates which would allow the items to be updated/or not to
be more granularly controlled but this would become messy and the code
would look shitty
Till this is resolved the demo site will not be able to delete all tags for
a detaset and I imagine there will be some other related issues that I've
not yet seen
What way should we look at going?
Tobes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120712/cdf04461/attachment.html>
More information about the ckan-dev
mailing list