diff --git a/geotrek/infrastructure/management/commands/loadinfrastructure.py b/geotrek/infrastructure/management/commands/loadinfrastructure.py index 5ddde1a4d2..fe13537668 100644 --- a/geotrek/infrastructure/management/commands/loadinfrastructure.py +++ b/geotrek/infrastructure/management/commands/loadinfrastructure.py @@ -232,6 +232,8 @@ def create_infrastructure(self, geometry, name, type, category, use_structure, self.stdout.write("Update : %s with eid %s" % (name, eid)) else: infra = Infrastructure.objects.create(**fields_without_eid) + if condition_type: + infra.conditions.add(condition_type) if settings.TREKKING_TOPOLOGY_ENABLED: try: geometry.coord_dim = 2