Merge branch 'master' into nanterre-recette
This commit is contained in:
commit
c80a87508f
|
@ -1,3 +1,4 @@
|
|||
import urlparse
|
||||
import copy
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
|
@ -39,7 +40,9 @@ def test_list_doublons(nanterre_classic_family, app):
|
|||
assert response.json['err'] == 0
|
||||
assert 'more' in response.json
|
||||
assert 'cookie' in response.json
|
||||
assert response.json['cookie'] in response.json['more']
|
||||
assert response.json['cookie'] == urlparse.parse_qs(
|
||||
urlparse.urlparse(
|
||||
response.json['more']).query)['cookie'][0]
|
||||
assert len(response.json['data']) >= 10
|
||||
assert response.json['data'][0]['id'] == d.id
|
||||
assert response.json['data'][0]['individu_1']['id'] == first_id
|
||||
|
|
|
@ -205,10 +205,6 @@ class Log(models.Model):
|
|||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_('content'))
|
||||
url = models.URLField(
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_('url'))
|
||||
|
||||
class Meta:
|
||||
ordering = ('-timestamp', '-id')
|
||||
|
|
|
@ -231,12 +231,12 @@ class FragmentBuilder(object):
|
|||
message += u': ' + error_detail
|
||||
self.human_result = message
|
||||
# on journalise:
|
||||
# - si c'est un succès
|
||||
# - si c'est un succès ou une erreur irrécupérable
|
||||
# - dans tous les cas si l'état actuel du job n'est pas une erreur (TODO), i.e. on
|
||||
# journalise toujours au premier essai
|
||||
if state == Job.STATE_SUCCESS or (
|
||||
job.state != Job.STATE_ERROR
|
||||
and job.state != Job.STATE_UNRECOVERABLE_ERROR):
|
||||
if (state == Job.STATE_SUCCESS or state == Job.STATE_UNRECOVERABLE_ERROR
|
||||
or (job.state != Job.STATE_ERROR
|
||||
and job.state != Job.STATE_UNRECOVERABLE_ERROR)):
|
||||
for individu in self.individus:
|
||||
utils.journalize(
|
||||
individu,
|
||||
|
|
Loading…
Reference in New Issue