0001-clicrdv-fix-fiche-attribution-39313.patch
passerelle/apps/clicrdv/models.py | ||
---|---|---|
184 | 184 |
# optional parameters, if any... |
185 | 185 |
for fieldname in (fields.keys() + extra.keys() + data.keys()): |
186 | 186 |
if fieldname.startswith('clicrdv_fiche_'): |
187 |
appointment['fiche'][fieldname[14:]] = get_data(fieldname) or '' |
|
187 |
appointment['appointment']['fiche'][fieldname[14:]] = get_data(fieldname) or ''
|
|
188 | 188 |
try: |
189 | 189 |
r = self.request('appointments', 'post', json=appointment) |
190 | 190 |
r.raise_for_status() |
tests/test_clicrdv.py | ||
---|---|---|
191 | 191 |
apiuser=apiuser) |
192 | 192 | |
193 | 193 |
data = {'fields': {'clicrdv_date_raw': '2017-01-01' , 'clicrdv_time_raw': '12:00:00', |
194 |
'clicrdv_fiche_str10': 'Test', |
|
194 | 195 |
'firstname': 'Foo', 'lastname': 'Bar', 'email': 'foobar@example.com'}} |
195 | 196 |
resp = app.post_json('/clicrdv/test/interventions/63258/create?apikey=apiuser', params=data).json |
196 | 197 |
assert resp['data'] |
197 |
- |