Projet

Général

Profil

0001-do-not-anonymise-agents-in-evolutions-fixes-11432.patch

Benjamin Dauvergne, 20 juin 2016 11:57

Télécharger (1,48 ko)

Voir les différences:

Subject: [PATCH] do not anonymise agents in evolutions (fixes #11432)

It allows making statistics on agents.
 wcs/formdata.py | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
wcs/formdata.py
158 158
        }
159 159
        if self.status:
160 160
            data['status'] = self.status[3:]
161
        if not anonymise:
162
            try:
163
                if self.who != '_submitter':
164
                    user = get_publisher().user_class.get(self.who)
165
            except KeyError:
166
                pass
167
            else:
168
                if user:
169
                    data['who'] = user.get_json_export_dict()
170
            if self.comment:
171
                data['comment'] = self.comment
161
        try:
162
            if self.who != '_submitter':
163
                user = get_publisher().user_class.get(self.who)
164
        except KeyError:
165
            pass
166
        else:
167
            if user and not anonymise:
168
                data['who'] = user.get_json_export_dict()
169
        if self.comment and not anonymise:
170
            data['comment'] = self.comment
172 171
        parts = []
173 172
        for part in self.parts or []:
174 173
            if hasattr(part, 'get_json_export_dict'):
175
-