[ckan-changes] commit/ckan: kindly: [dictization] #1356 fix extras so can reuse old key and values

Bitbucket commits-noreply at bitbucket.org
Wed Sep 28 13:24:53 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/1defa48097f5/
changeset:   1defa48097f5
user:        kindly
date:        2011-09-28 15:24:18
summary:     [dictization] #1356 fix extras so can reuse old key and values
affected #:  1 file (-1 bytes)

--- a/ckan/lib/dictization/model_save.py	Wed Sep 28 13:13:23 2011 +0100
+++ b/ckan/lib/dictization/model_save.py	Wed Sep 28 14:24:18 2011 +0100
@@ -95,7 +95,8 @@
     #changed
     for key in set(new_extras.keys()) & set(old_extras.keys()):
         extra = old_extras[key]
-        if new_extras[key] == extra.value:
+        #dont change state to pending if nothing has changed
+        if new_extras[key] == extra.value and extra.state != 'deleted':
             continue
         state = 'pending' if context.get('pending') else 'active'
         extra.value = new_extras[key]

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list