ants_hub: do not synchronize if CHRONO_ANTS_HUB_URL is absent (#78243) #95

Merged
bdauvergne merged 1 commits from wip/78243-ants-hub-la-commande-leve-une-er into main 2023-06-07 17:27:42 +02:00
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from django.conf import settings
from django.core.management.base import BaseCommand
from chrono.apps.ants_hub import models
@ -23,4 +24,6 @@ class Command(BaseCommand):
help = 'Synchronize agendas with the ANTS hub.'
def handle(self, **options):
if not settings.CHRONO_ANTS_HUB_URL:
return
models.City.push()