[ckan-dev] Context in record hook

Ian Ward ian at excess.org
Wed Sep 5 20:42:58 UTC 2018


You might find the original value in the model instance, e.g.
context['package'].extras I've used this in validators to detect changes to
specific dataset fields. This isn't a published interface so it might not
be available in the future.

On Wed, Sep 5, 2018 at 4:31 PM Gavin Cannizzaro <gcannizzaro at mindgrub.com>
wrote:

> Hi all,
>
> Is it possible to access the previous version of a record (aka package)
> from an update hook?  For example, if we wanted to take an action based on
> a certain field having changed.
>
> Thanks!
> Gavin
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20180905/94e2b12a/attachment-0002.html>


More information about the ckan-dev mailing list