allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [8/9] git commit: [#7292] for safety, don't return ming-instrumented objects since any modifications someone might do elsewhere (after calling __json__) would actually persist to the database
Date Mon, 21 Apr 2014 17:24:07 GMT
[#7292] for safety, don't return ming-instrumented objects since any modifications someone
might do elsewhere (after calling __json__) would actually persist to the database


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/1ed540f8
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1ed540f8
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1ed540f8

Branch: refs/heads/master
Commit: 1ed540f898a124a808cf29377332f8767b092e4f
Parents: 1b51b77
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Mon Apr 21 17:18:13 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Apr 21 17:22:30 2014 +0000

----------------------------------------------------------------------
 Allura/allura/ext/user_profile/user_main.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/1ed540f8/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index bbc568b..8f2a373 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -309,12 +309,12 @@ class PersonalDataSection(ProfileSectionBase):
         return dict(
             username=self.user.username,
             joined=auth_provider.user_registration_date(self.user),
-            localization=self.user.get_pref('localization'),
+            localization=self.user.get_pref('localization')._deinstrument(),
             sex=self.user.get_pref('sex'),
-            telnumbers=self.user.get_pref('telnumbers'),
+            telnumbers=self.user.get_pref('telnumbers')._deinstrument(),
             skypeaccount=self.user.get_pref('skypeaccount'),
-            webpages=self.user.get_pref('webpages'),
-            availability=self.user.get_pref('availability'))
+            webpages=self.user.get_pref('webpages')._deinstrument(),
+            availability=self.user.get_pref('availability')._deinstrument())
 
 
 class ProjectsSection(ProfileSectionBase):
@@ -360,4 +360,4 @@ class SocialSection(ProfileSectionBase):
 
     def __json__(self):
         return dict(
-            socialnetworks=self.user.get_pref('socialnetworks'))
+            socialnetworks=self.user.get_pref('socialnetworks')._deinstrument())


Mime
View raw message