[ckan-changes] commit/ckan: rgrp: [logic/user][s]: do not create revision for changes to users as they are not revisioned.

Bitbucket commits-noreply at bitbucket.org
Sun Sep 4 16:27:33 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/1952445d2802/
changeset:   1952445d2802
branch:      release-v1.4.3
user:        rgrp
date:        2011-09-04 18:22:42
summary:     [logic/user][s]: do not create revision for changes to users as they are not revisioned.

* This had already been removed in cset:8d6fde0e2196 (then in user controller) but Adria seems to have reinstated this when refactoring things into the logic layer. This 'bug' explains the huge number of empty revisions we have been seeing on ckan.net.
affected #:  2 files (467 bytes)

--- a/ckan/logic/action/create.py	Thu Sep 01 19:09:54 2011 +0100
+++ b/ckan/logic/action/create.py	Sun Sep 04 17:22:42 2011 +0100
@@ -230,14 +230,6 @@
         model.Session.rollback()
         raise ValidationError(errors, group_error_summary(errors))
 
-    rev = model.repo.new_revision()
-    rev.author = user
-
-    if 'message' in context:
-        rev.message = context['message']
-    else:
-        rev.message = _(u'REST API: Create user %s') % data.get('name')
-
     user = user_dict_save(data, context)
 
     model.repo.commit()        


--- a/ckan/logic/action/update.py	Thu Sep 01 19:09:54 2011 +0100
+++ b/ckan/logic/action/update.py	Sun Sep 04 17:22:42 2011 +0100
@@ -386,14 +386,6 @@
         model.Session.rollback()
         raise ValidationError(errors, group_error_summary(errors))
 
-    if not preview:
-        rev = model.repo.new_revision()
-        rev.author = user
-        if 'message' in context:
-            rev.message = context['message']
-        else:
-            rev.message = _(u'REST API: Update user %s') % data.get('name')
-
     user = user_dict_save(data, context)
     
     if not preview:

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