0066-misc-fix-modified-iterating-dict-pylint-error-62099.patch
passerelle/apps/family/models.py | ||
---|---|---|
276 | 276 |
'autobilling', |
277 | 277 |
), |
278 | 278 |
) |
279 |
for date_attribute in data:
|
|
279 |
for date_attribute, date_value in data.items():
|
|
280 | 280 |
if not date_attribute.endswith('_date'): |
281 | 281 |
continue |
282 | 282 |
if date_attribute == 'payment_date': |
283 |
data[date_attribute] = get_datetime(data[date_attribute])
|
|
283 |
data[date_attribute] = get_datetime(date_value)
|
|
284 | 284 |
else: |
285 |
data[date_attribute] = get_date(data[date_attribute])
|
|
285 |
data[date_attribute] = get_date(date_value)
|
|
286 | 286 |
data['paid'] = bool(data.get('payment_date')) |
287 | 287 |
Invoice.objects.update_or_create( |
288 | 288 |
resource=self, family=family, external_id=invoice['id'], defaults=data |
289 |
- |