do partial upsert (#44992)
This commit is contained in:
parent
9a8042b141
commit
c4826ee499
|
@ -420,7 +420,13 @@ query getDossiers($demarcheNumber: Int!, $createdSince: ISO8601DateTime, $first:
|
|||
setattr(entreprise, attr, value)
|
||||
except Entreprise.DoesNotExist:
|
||||
entreprise = Entreprise(resource=self, **row)
|
||||
entreprise.save()
|
||||
|
||||
try:
|
||||
with transaction.atomic():
|
||||
entreprise.save()
|
||||
except Exception:
|
||||
self.logger.error("Partial upsert on dossier %s" % ds_dossier.pk)
|
||||
pass
|
||||
|
||||
return res
|
||||
|
||||
|
|
Reference in New Issue