dans le fichier DS, les siren sont uniques par periode

This commit is contained in:
Thomas NOËL 2020-05-19 12:00:28 +02:00
parent 82fec4fd41
commit c9fc1b6f72
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2020-05-19 09:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('passerelle_reunion_fsn', '0005_text_to_jsonb'),
]
operations = [
migrations.AlterUniqueTogether(
name='entreprise',
unique_together=set([('resource', 'sequence'), ('resource', 'periode', 'siren')]),
),
]

View File

@ -729,7 +729,7 @@ query getDossiers($demarcheNumber: Int!, $createdSince: ISO8601DateTime, $first:
class Entreprise(models.Model):
class Meta:
unique_together = (('resource', 'sequence'), ('resource', 'siren'),)
unique_together = (('resource', 'sequence'), ('resource', 'periode', 'siren'),)
resource = models.ForeignKey(FSNReunionConnector, on_delete=models.CASCADE)
code_application = models.CharField(max_length=20)